Blog
Read the latest blogs
Find tutorials, guides and use case examples in the
Learning center
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:
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.
The name of the variable. A variable name can contain any characters and it is case-sensitive.
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.
Add any number of fields that can contain dynamic content and be used as tokens in the value.
Set the scope in which to load this variable.
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
©2024, Leapwork. All rights reserved.