Define a global variable that will not be removed when exiting the current script execution scope.  #GLOBAL can be called for a variable anywhere in the current scope of the variable, including before or after it is assigned a value.


#GLOBAL($variable[, expression])


  • variable - Variable, including the dollar sign, to make a global variable.
  • expression - Optional cTemplate expression to be evaluated and result assigned to the variable.  If no expression is provided the variable will be unchanged (even if not set yet), but flagged to be local.


If the following cScript is executed inside the scope of another object (ie. a Template), the $Date variable will remain after the Template is executed.

Template with Identifier "GetDate"



Publication Procedure

Date: $Date


Date: 1975-12-20