Hello! So I recently made a question about having some data stored even when we change the page. And for that we can use client variables that keep the information. . But when we move to another module, we no longer have access to those variables! An example, I go fecth information about the user, and I take the areas associated to the user.. I dont want to make more queries, o I want to store that list of areas in some place.. Not only client variables do not accept this type of data,I also dont have access to this in other modules.
How to keep a list saved while the session is up? :)
All help is appreciated! :)
When creating references, you should always take into account your architecture. Being that said, a side reference is not necessarily a violation, between core applications / modules for instance it is actually quite common. You should see if it makes sense on your architecture to have that side reference or to have a module in a level below.
Regarding the allowed value types in client variables, indeed lists and records are not allowed.
If you would be working on Mobile, I would suggest using Local Storage which is not allowed in Reactive applications.
As I see it, you only have two options to persist tables and records in a Reactive application:
And of course, don't forget to avoid storing confidential information on client variables.
Kind Regards,João
Hi Ricardo,
If you intend to use client variables from module A in module B, you can easily create two actions in module A (one that returns the value of the client variable and another that receives the value and assigns to the client variable) and reference / consume them in module B.
You should do the exact same thing with database actions where you expose wrappers that perform CRUD actions to be used by the consumer modules.
Consuming actions from one module to another is creating side references.
Another thing is, list and records if needed to be stored, cant be stored in those client variables, any workaround? :)
Yes this is a reactive web app. This reply was the solution I was searching for! Thanks :)