User-Defined Global Variables in Method Calls
You can use method calls to store values in user-defined global variables and refer to them in other method calls.
USoft does not recommend the use of global variables except in the rare cases where a variable is constantly being referred to from different runtime contexts (info windows, dialogs, or controls).
The syntax of calling this method to create or reset global variables is:
ResourceFileUpdate('<global_variable_name>: <string value>')
You can create as many concurrent global variables as you like. Make sure that each global variable name is unique and that it cannot be interpreted as a GUI class name. Global variables remain available until the end of the user session.
If you set an already existing global variable, the current value of that variable is overwritten.
To create a global variable "flag_1" and set its value to 'Y', write:
To create a global variable "flag_1" and set its value to the string currently in the NAME field, write:
ResourceFileUpdate(FORMULA(':1 || :2', 'flag_1: ', query.name()))
Once set, a global variable can be referred to in SQL contexts by preceding the variable name by a colon and surrounding it by double quotes:
:"<global variable name>"
To perform a certain action if the "flag_1" variable currently has the value 'Y', write a Decision with the following Decision SQL statement:
:"flag_1" = 'Y'
Set the Yes Action to the method call script to be executed if this condition is met.