webCOMAND

#GLOBAL

Syntax

#GLOBAL(Variable)

Parameters

  • Variable - Variable, including the dollar sign, to make a global variable.

Description

Make a variable 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.

Example

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"

#GLOBAL($Date)
#ASSIGN($Date,'1975-12-20')

Publication Procedure

#INSERT(Template,GetDate)
Date: $Date

Result

Date: 1975-12-20