Set Variable

A Set variable building block is used to set the value of a variable. Variables can be scoped to be available only in the same run of a case, across all cases in a run and even permanently for as long as the Project it is stored in exists.

See the Use Numbers and Variables lesson for examples on how to use variables.

Fully expanded, the Set variable block shows the following properties:

Set-variable

The Block Header (“Set variable”)

The green input connector in the header is used to trigger the block to start executing.

The green output connector in the header triggers when the variable has been saved.

The title of the block (“Set variable”) can be changed by double-clicking on it and typing in a new title.

Variable name

The name of the variable. A variable name can contain any characters and it is case-sensitive.

Value

The value of the variable. Can contain tokens for field values (added below). Right-click and select “Insert token” to insert one or more field tokens.

Text fields

Add any number of fields that can contain dynamic content and be used as tokens in the value.

Scope

Set the scope in which to load this variable.

  • “Only this case” means that the variable only exists during the execution of this one case, this one time. This is the default and usually most appropriate type.
  • “Schedule” means the variable will exist across all cases defined in a schedule during the same run.
  • “Permanent” means the variable will continue to exist permanently, day after day, even after hundreds of runs.

Variables of different scope are unique. This means that a variable named “test” with “Permanent” scope is not the same as a variable named “test” with “Only this case” scope.

 

Updated February 6th 2018