Sets up a variable that can be used across a user session. For example, the user may store a value in one Maths item, for it to be later used by the same user in a different maths or linked action
Global variables will be reset when a user logs in again.
SET-GLOBAL-VARIABLE( <VARIABLE NAME>,<Value> ) - sets the value of a global variable
GLOBAL-VARIABLE( <VARIABLE NAME> ) - gets the current value of a global variable
CLEAR-GLOBAL-VARIABLES ("USER") - clears the current global variables for the user
Code: Select all
#sets a couple of global variable strings SET-GLOBAL-VARIABLE( "GVAR1" , " 123" ) SET-GLOBAL-VARIABLE( "GVAR2" , " ABC" ) #Display the global variables Var1 = GLOBAL-VARIABLE( "GVAR1" ) MESSAGE( Var1 ) # Var2 = GLOBAL-VARIABLE( "GVAR2" ) MESSAGE( Var2 )