Custom Field Value
The Custom Field Value Instructions return the values of Template and Step level Custom Fields.
This category includes two types of FieldLogs specific Script Instructions:
Flkw:GetTemplateCustomFieldValue
Flkw:GetStepCustomFieldValue
Flkw:GetStepIDForCustomFieldValue
Flkw:GetTemplateCustomFieldValue
is a Custom Field Value Instruction that returns the value of Template level Custom Fields.
Format: GetTemplateCustomFieldValue('Custom Field Label','Column Index','Row Index');
Parameters | Description |
---|---|
Custom Field Label | The Label of the Template level Custom Field to be returned. |
Column Index | The Column Index Value of the Custom Field. This is applicable when there are multiple fields in a Custom Field. |
Row Index | The Row Index Value of the Custom Field. This is applicable when there are multiple entries provided for a Custom Field. |
Note
The Column Index and Row Index values are optional. If the values are not set, it will be automatically set to 0.
To construct a Script Instruction using Flkw:GetTemplateCustomFieldValue
:
Select JS Execute from the Instruction dropdown list. In the Expression field, enter the
Flkw:GetTemplateCustomFieldValue
Instruction as shown.At runtime, the Template Custom Field Value (Battery Installation) is retrieved and displayed as an alert.
Flkw:GetStepCustomFieldValue
returns the value of Step level Custom Fields.
Format: GetStepCustomFieldValue(Step ID, Custom Field Label, Column Index, Row Index);
Parameter | Description |
---|---|
Step ID | The ID of the Step whose value is to be retrieved. |
Custom Field Label | The Label of the Step level Custom Field to be returned. |
Column Index | The Column Index Value of the Step level Custom Field. This is applicable when there are multiple entries provided for a Custom Field. |
Row Index | The Row Index Value of the Step level Custom Field . This is applicable when there are multiple entries provided for a Custom Field. |
Note
The Column Index and Row Index values are optional. If the values are not set, it will be automatically set to 0.
In the example below, a Custom Field Battery Level with multiple values is linked to the Step of ID (3). The value of the Custom Field can be retrieved using the Flkw:GetStepCustomFieldValue
Instruction.
![]() |
To construct a Script Instruction using Flkw:GetStepCustomFieldValue
:
Select JS Execute from the Instruction dropdown list. In the Expression field, enter the
Flkw:GetStepCustomFieldValue
Instruction as shown.The
Flkw:GetStepCustomFieldValue
Instruction is added to the Script associated with the Step of ID 3.At runtime, this script gets the value (220) of the Custom Field. The Script then validates Step 3 with this value 220 as seen below.
GetStepIDForCustomFieldValue
returns the Step ID with the specified value for the provided Step level Custom Field.
Format: GetStepIDForCustomFieldValue(Custom Field Label, Value);
Parameter | Description |
---|---|
Custom Field Label | The Label of the Step level Custom Field. |
Value | The value of the Step level Custom Field. |
To construct a Script Instruction using Flkw:GetStepIDForCustomFieldValue
:
Select JS Execute from the Instruction dropdown list. In the Expression field, enter the
GetStepIDForCustomFieldValue
Instruction as shown.The
Flkw:GetStepIDforCustomFieldValue
Instruction is added to the Script associated with the Step of ID 9.At runtime, this script gets the Step ID (9) that has the specified value for the provided Custom Field. The Script then validates Step 5 with Step ID (9) as seen below.