Step Value
The Step Value Instructions retrieve/set the current values of Task Steps.
This category includes six types of FieldLogs specific Instructions:
Flkw:GetValueOfStep
Flkw:SetValueOfStep
Flkw:GetValidatedValueOfStep
Flkw:ValidateStepWithValue
Flkw:GetStepValueFromExecPath
Flkw:ValidateStepWithValueFromExecPath
Note
Step Value refers to the value that is entered in the UI. This is not yet saved into the Task.
Validated Step Value refers to the value of of the Step that is saved into the Task.
Flkw:GetValueOfStep
retrieves the Step value that the user has entered in the UI. This value is not saved into the Task.
Flkw:SetValueOfStep
sets the Step value 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.
Flkw:GetValidatedValueOfStep
gets the value that is saved into the Task.
Flkw:ValidateStepWithValue
sets the value in the UI and saves it into the Task. It is automatically validated and the user is not required to validate the entry.
Flkw:GetStepValueFromExecPath
retrieves the Step value that the user has entered in the UI using the Execution Path provided.
Flkw:ValidateStepWithValueFromExecPath
sets the Step value in the UI and saves it into the Task using the Execution Path provided. It is automatically validated and the user is not required to validate the entry.
Important
Step ID may be different from the Step number displayed in the UI. Generally, Step numbers are displayed when a Template is opened.
![]() |
Click
to see the Step IDs. The Step IDs are displayed as seen below.![]() |
Use these Step IDs in Scripts.
Note that the Step IDs are underlined and in italics ( 4, 5, 6 ) unlike Step numbers ( 1, 2, 3 ).
Flkw:GetValueOfStep
retrieves the value of the specified Step.
Format: Flkw:GetValueOfStep('Step ID');
Parameter | Description |
---|---|
Step ID | The ID of the Step whose value is to be retrieved. |
To construct a Script Instruction using Flkw:GetValueOfStep
:
Select
from the dropdown list. In the field, enter theFlkw:GetValueOfStep
Instruction as shown.
A Flkw:GetValueOfStep
Script Instruction is added to the Script .
In the example, the value is stored in a Local Variable and used in the Script.
Flkw:SetValueOfStep
sets the value of the specified Step.
Format: Flkw:SetValueOfStep('Step ID','Value');
Parameter | Description |
---|---|
Step Id | The ID of the Step whose value is to be set. |
Value | The value to be set. |
To construct a Script Instruction using Flkw:SetValueOfStep
:
Select
from the dropdown list. In the field, enter theFlkw:SetValueOfStep
Instruction as shown.This Script is added to the Step that will cause the action to be triggered after it is validated.
A Flkw:SetValueOfStep
Script Instruction is added to the Script as shown above.
At runtime, let us suppose that the user enters 4400 as the Battery Mains Voltage and 8 as the Number of Equipments.
![]() |
The Script does the following:
battVoltage= 4400
noEquipments = 8
voltagePerDevice = 4400 / 8 = 550
The Flkw:SetValueOfStep
sets the value of 550 to the Step 3 ( Step ID 7 ).
![]() |
Note that the value is not validated by the Script. The user is required to validate it.
Flkw:GetValidatedValueOfStep
retrieves the validated value of a given Step of the Template and stores it in a Local Variable.
Format: Flkw:GetValidatedValueofStep ( 'Step ID' );
Parameter | Description |
---|---|
Step ID | The ID of the Step whose validated value is to be retrieved. |
To construct a Script Instruction using Flkw:GetValidatedValueofStep
:
Select
from the dropdown list. In the field, enter theFlkw:GetValidatedValueofStep
Instruction as shown.
A Flkw:GetValidatedValueofStep
Script Instruction is added to the Script.
In the example above, the values are stored in Local Variables and used in the Script.
Flkw:ValidateStepWithValue
is a Step Value Instruction that sets the validated value of a specified Step.
Format: Flkw:ValidateStepWithValue('Step ID','Value');
Parameter | Description |
---|---|
Step ID | The ID of the Step whose validated value is to be set. |
Value | The value to be set. |
To construct a Script Instruction using Flkw:ValidateStepWithValue
:
Select
from the dropdown list. In the field, enter theFlkw:ValidateStepWithValue
Instruction as shown.
A Flkw:ValidateStepWithValue
Script Instruction is added to the Script as shown above.
At runtime, let us suppose that the user enters 4400 as the Battery Mains Voltage and 8 as the Number of Equipments.
![]() |
The Script does the following:
battVoltage = 4400
noEquipments = 8
voltagePerDevice = 4400 / 8 = 550
The Flkw:ValidateStepWithValue
sets the value of 550 to the Step 3 ( Step ID 7 ).
It is important to associate this Script with the last step that will be validated. This will ensure that the user has filled in all the data that the Script requires to perform the desired action.
![]() |
Note the value is already validated by the Script. The user is not required to validate it.
Flkw:GetStepValueFromExecPath
retrieves the value of the specified Step when the execution path is provided.
Note
Values of steps inside components can also be retrieved.
Format: Flkw:GetStepValueFromExecPath('Step Execution Path');
Parameter | Description | |
---|---|---|
Step Execution Path | The Execution Path of the Step. For example, a Step Execution Path value of “2,6,1,8” points to the step id 8, and it is located as follows:
|
To construct a Script Instruction using Flkw:GetStepValueFromExecPath
:
Select
from the dropdown list. In the field, enter theFlkw:GetStepValueFromExecPath
Instruction as shown.A
Flkw:GetStepValueFromExecPath
Script Instruction is added to the Script as shown above.In the example, the Execution Path value of 7,3,9,5 points to the Step of ID (5). At runtime, after the validation of Step 1.1.1.1, the value is displayed as an alert.
Note
Values of steps inside components can also be retrieved.
Flkw:ValidateStepWithValueFromExecPath
is a Step Value Instruction that sets the validated value of a specified Step to a Step in a component or a Step when the execution path is provided.
Format: Flkw:ValidateStepWithValueFromExcePath('Step Execution Path','Value');
Parameter | Description | |
---|---|---|
Step Execution Path | The Execution Path of the Step. For example, a Step Execution Path value of “2,6,1,8” points to the step id 8, and it is located as follows:
| |
Value | The value to be set. |
To construct a Script Instruction using Flkw:ValidateStepWithValueFromExecPath
:
Select
from the dropdown list. In the field, enter theFlkw:ValidateStepWithValueFromExecPath
Instruction as shown.A
Flkw:ValidateStepWithValueFromExecPath
Script Instruction is added to the Script as shown above.In the example, the Execution Path value of 7,3,9,4 points to the Step of ID (4). The value of Step of ID (4) is stored in the variable 'val'.
The Execution Path value of 7,3,9,10,5 points to the Step of ID (5) to be validated.
At runtime, after the validation of Step 1.1.1.2, the Step 1.1.1.4 is validated with the value 240 as shown below..