Get Variable

A Get variable building block is used to get the value of a variable and pass it on to other building blocks. 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.

Variable need to be defined using Set Variable block before using get variable otherwise it will throw error “Variable ‘NameOnGetVariable’ does not exist, default value ” is used instead. See the Use Numbers and Variables lesson for examples on how to use variables.

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

Get-variable

The Block Header (“Get variable”)

There are no green input or output connectors in the header, because this building block is never explicitly executed. Rather, it is used to get a value and deliver it to other building blocks.

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

Variable name

The name of the variable. Please note that variable name is case-sensitive.

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.

Default value

Set a default value for the variable, if it is not found in the scope.

 

Updated February 6th 2018.