Set Variable Action

Description

Changes the contents of an already existing variable.

Variables are used as storage mechanism to store data while a Workflow is running. For more information see Variables. Once a variable is created, its contents can be displayed at runtime by placing the variable name in percent signs (e.g. %myvarname% will automatically be converted it its contents at runtime).

Declaration

<AMSET VARIABLENAME="text">text</AMSET>

Example

<AMSET NAME="myvar">Set the variable to this value</AMSET>

General Tab Parameters

Variable Name: Specifies the name of the variable to change.

Text, Required
MARKUP: VARIABLENAME="thecurrentdate"

New Value: Specifies the value that the variable should be changed to. As with all parameters, this value may be literal or an expression (if surrounded by percent % signs).

Text, Required
MARKUP: VALUE="The current date is %Now()%"

Notes

All variables must be created before they can be used. This is done using the Create Variable <AMVARIABLE> action. Once created, variables can be set using the Set Variable <AMSET> action, or by certain actions that support populating variables. To get data out of the variables, in any action parameter, simply surround the variable name with percentage % signs (e.g. %varname%). Remember not to use percentage signs when specifying the name of a variable to populate, percentage signs are only needed to get data out.

See Also

Create Variable