User-defined global variables |
You can store values in user-defined global variables and refer to them in action scripts. Call the ResourceFileUpdate() action: 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. Example 1 To create a global variable "flag_1" and set its value to 'Y', write: ResourceFileUpdate('flag_1: Y')
Example 2 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>"
Example 3 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 action statement script to be executed if this condition is met.
See Also |