Page 1 of 1

Global Variables

Posted: Thu Dec 07, 2023 7:45 pm
by jtaljaard
Is there a method we can use to pass through variables to other components (different forms/reusable parts)?

Currently, we use:
Use Builtin(SET_SESSION_VALUE) With_Args('UDEF=' #COMPCODE.AsString)

But should we later need the value in a different form and we use the get_session_value the value will be reset to 0. What is a method to create a variable that we can constantly reference should we need specific data from it?

The other limitation is that we cant pass multiple variables with set_session_value

Re: Global Variables

Posted: Thu Dec 07, 2023 9:30 pm
by cesarrafael
Hi jtaljaard,

It depends of what you're trying to achieve and the type of application....You can use Data areas (dtaara) objects to store information, you can create "user space" objects, you can save lists, you can create reusable parts that can use the "scope application" and will hold values in memory for as long as the session is active...

Re: Global Variables

Posted: Fri Dec 08, 2023 9:33 pm
by René Houba
Hi Jared,

In the June 2020 Newsletter I explain the SCOPE(*APPLICATION):
SCOPE.PNG
SCOPE.PNG (103.43 KiB) Viewed 63236 times
Newsletter download:
https://lansa.com/support/newsletter20.html

I'm working on a new Newsletter at the moment, where I show an example with SCOPE(*APPLICATIONS) and VL Web components.

Kind regards,
René

Re: Global Variables

Posted: Wed Dec 13, 2023 1:19 am
by jtaljaard
Awesome, thank you so much Rene.