Step Value
The Step Value Instructions allows manipulation of the current values of Template Steps. The Step Value category includes four types of Script Instructions:
Get Step Value
Set Step Value
Get Validated Step Value
Validate Step
Note
refers to the value that is entered in the UI. This is not yet saved into the Task.
refers to the value of of the Step that is saved into the Task.
retrieves the that the user has entered in the UI. This value is not saved into the Task. sets the in the UI as if the user just input it. This value is not yet saved into the Task. The user still needs to validate the entry in order to save the value into the Task.
gets the value that is saved into the Task. sets the value in the UI and saves it into the Task. It is automatically validated and the user need not validate the entry.
is a Step Value Instruction that retrieves the value of the specified Step and stores it in a Local Variable.
To construct a Script Instruction using
:Select
from the dropdown list. Options and appear as seen below.Enter the name of the Local Variable in the
field. Choose the Step whose value needs to be retrieved in the dropdown list.In the below example:
At runtime, the Local Variable deviceCount holds the value entered by the user in the Step '4 How many devices are connected to the battery?'
The
Script Instruction is added to the Script.
is a Step Value Instruction that sets the value of the specified Step. It executes a JavaScript expression and sets the result as the current value for a specified Step of the Template.
To construct a Script Instruction using
:Select
from the dropdown list. Options and appear as seen below.Choose the Step for which the value needs to be set in the
dropdown list.In the
field, enter the JavaScript expression whose result will be set as the value of the selected Step.In the below example:
At runtime, the '4 Battery Voltage Slab' of the Template with the result of the Expression var(enteredVoltage) / 10.
Instruction sets the value of the Step
The
Script Instruction is added to the Script.![]() |
At runtime, if the user enters 550 in Step 3, the following occur:
enteredVoltage = 550
Value of Step 4 is automatically populated with the value 55 ( 550 / 10 ).
![]() |
is a Step Value Instruction that retrieves the value of the specified Step after it has been validated and stores it in a Local Variable.
To construct a Script Instruction using
:Select
from the dropdown list. Options and appear as seen below.Enter the name of the Local Variable in the
field. Choose the Step whose value needs to be retrieved in the dropdown list.In the below example:
At runtime, the Local Variable batteryID holds the validated value of the Step '1 Enter BatteryID'
The Get Validated Step Value Script Instruction is added to the Script.
![]() |
At runtime, if the user enters 'E123' in Step 1 and validates it, the following occur:
batteryID = 'E123'
The value of Step 3 is set as 'Model: ' + 'E' ( 'E' is extracted from the validated value 'E123')
The user sees the value of Step 3 set as seen below.
![]() |
Validate Step is a Step Value Instruction that validates the specified Step with a value. It executes a JavaScript expression, sets the result as the value for a specified Step of the Template and validates it.
To construct a Script Instruction using
:Select
from the Instruction dropdown list. Options and appear as seen below.Choose the Step whose value needs to be validated in the
dropdown list.In the
field, enter the JavaScript expression whose result will be set as the value of the Step to be validated.In the example:
At runtime, the Validate Step Instruction sets the value of the Yes/No Step '5 Is this a replaceable model?' of the Template with the result of 1 causing the Yes/No Step to take a value of 'Yes'.
Note
Yes = 1 and No = 0 for a Yes/No Step
The
Script Instruction is added to the Script.This Script Instruction is set to execute after Step 4 Enter the inventory ID of the Template is validated. If the user enters an inventory ID, it implies that the battery is replaceable. Hence, the Script sets a value of 1 to Yes/No Step 5 and validates it.