Difference in local and input variable

Just need to know of local and input variable behavior in the web application.

Seems work like same to hold the value with in the screen. can anyone please tell the difference?

Thanks

Shoeb

Sheob Ahmad wrote:

Just need to know of local and input variable behavior in the web application.

Seems work like same to hold the value with in the screen. can anyone please tell the difference?

Thanks

Shoeb

Hi Shoeb,

Yes, they are same but input parameter has one extra benefit that it's value can be passed from other screen using query string parameters.


Hello Shoeb,


They behave the same inside the screen, the only difference is its initial value.

Initial values of input variables depend on what were passed to the screen prior to navigation.

Initial values of local variables depend on assigned default value or what was assigned in preparation.


Hope it helps!

- Emman

Sheob Ahmad wrote:

Just need to know of local and input variable behavior in the web application.

Seems work like same to hold the value with in the screen. can anyone please tell the difference?

Thanks

Shoeb


Hi Sheob,


Please refer below link suggested by OutSystems Community,


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


Thanks.

Solution

Hi Sheob,

Both are same almost. Local variables are declare on the screen while input variable we pass by navigation.

If input variables are set mandatory you need to give some value to these variables, will not be initialize by default value. 

Data type for input variables can be only basic data types or identifier only. For local variables you can choose any data type like basic data type, identifier, Entity, structure, record, list etc.

Thanks.

Solution