The Get variable building block retrieves the value of a variable and makes it available to other building blocks. Variables can be scoped so they are available only within the same case run, across all cases in a schedule run, or permanently for as long as the project exists.
A variable must be defined using Set Variable before you use Get variable. If the variable does not exist, the block throws an error and the Default value is used instead (for example: Variable 'NameOnGetVariable' does not exist, default value ...).
See the Use Numbers and Variables lesson for examples on how to use variables.
Fully expanded, the Get Variable block shows the following properties:
Note: The screenshot on this page uses the Elegance Design, introduced in 2025.3. If you are using an earlier version, your layout may look different.
Quick-start
-
Drag Get variable onto the canvas.
-
Specify Variable name, choose Scope, and optionally set Default value. Then connect Result value to the next block that needs the variable value.
-
Run the flow when it’s ready.
Building block parameters
Resources
|
Topic |
Description |
|---|---|
|
Common questions about creating, running, and managing flows in Leapwork. |
|
|
Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork. |