101
Views
3
Comments
Variable to be used among most screens within an application.
Question

Hello,

Where would I set up a variable that can be viewed and/or modified from any screen within an application?

The application is a mobile app.   Would the variable setup be similar in Web and Reactive as well?

Regards 

FrankCLT

2019-03-19 12-24-07
Mariano Picco
 
MVP

Client variable would be the answer, if simple enough. If it was a complex structure, consider making a Local entity for it. 

2021-08-12 11-00-27
Nordin Ahdi
 
MVP

Just to add to Mariano's answer. Client Variables can be created both for Mobile Apps and Reactive Web Apps. 

The value of a Client Variable can even be shared across different apps in the same environment, if the User Provider is the same and if the apps are running in the same browser.

Regards,

Nordin


2020-05-07 18-53-00
Rui Barradas
 
MVP

Hello Frank,

It really depends on how your logic is created. My first option is that you create a client variable:

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Handling_Data/Client_Variable

This type of variables works client-side and can be used in Mobile and Reactive Web applications.


Another option is to store that variable in the database Local Storage of your application. I personally like this approach because the data stored in the Local Storage works as a global data for that specific application and can be edited / changed at any time you want.


Kind regards,

Rui Barradas

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.