Skip to main content

FieldLogs

Rows

The Table Row manipulation Instructions manipulates the rows of Table Steps in a Template.

This category includes four types of Fieldlogs specific Instructions:

  1. Flkw:AddTableRow

  2. Flkw:DuplicateTableRow

  3. Flkw:SetTableRowValues

  4. Flkw:SetTableRowValidatedValues

Flkw:AddTableRow adds new rows at the end of the defined table. It can store the row index in a local variable.

Format: Flkw:AddTableRow('Step ID', number);

Parameters

Description

Step ID

The ID of the Target Table Step.

number

The number of new rows to add to the target table.

To construct a Script Instruction using Flkw:AddTableRow:

  • Select JS Execute from the Instruction dropdown list. In the Expression field, enter the Flkw:AddTableRow Instruction as shown. Here the Instruction adds two new rows to the Table.

    AddNewRows1.png

The Flkw:AddTableRow Instruction is added to the Script.

At runtime, the user enters just one row of information in the Table Step 1 and proceeds to Step 2.

AddTableRows2.png

After Step 2 is validated, note that the Script has added two new rows to the Table Step 1.

AddTableRows3.png

Flkw:DuplicateTableRow duplicates a defined number of rows and adds them to the table. The row index can be stored in a local variable.

Format: Flkw:DuplicateTableRow('Step ID', 'number','row number','Column Step ID','Starter ID');

Parameters

Description

Step ID

The ID of the target table step.

number

The number of rows to copy in the target table.

Row number

The row number that needs to be copied.

Column ID

The ID of the column that needs to be duplicated.

Starter ID

The ID of the first row in which you want to paste the copied rows.

To construct a Script Instruction using Flkw:DuplicateTableRow:

  • Select JS Execute from the Instruction dropdown list. In the Expression field, enter the Flkw:DuplicateTableRow Instruction as shown.

    DuplicateTableRows1.png

The Flkw:DuplicateTableRow Instruction is added to the Script.

Flkw:SetTableRowValues sets the value of a Row of the Table Step.

Format: Flkw:SetTableRowValues('Step ID','Row number','column Step IDs','values');

Parameters

Description

Step ID

The ID of the target table step.

Row number

The row number that needs to be set.

column Step IDs

The column Step IDs whose values are to be set.

values

The values to set in the target cells.

To construct a Script Instruction using Flkw:SetTableRowValues:

  • Select JS Execute from the Instruction dropdown list. In the Expression field, enter the Flkw:SetTableRowValues Instruction as shown.

    Note that two cells ( Row1Column1 and Row1Column2 ) are specified to be set with the values NewValue1 and NewValue2.

    SetTableRows1.png

The Flkw:SetTableRowValues is added to the Script.

SetRowVal2.png

At runtime, the Script sets the value of the specified cells with the values NewValue1 and NewValue2 as shown below.

SetRowVal3.png

Note that the values are not validated by the Script. The user is required to validate them.

Flkw:SetTableRowValidatedValues sets the value of a Row of the Table Step and validates it.

Format:Flkw:SetTableRowValidatedValues('Step ID','Row number','column Step IDs','values');

Parameters

Description

Step ID

The ID of the target table step.

Row number

The row number that needs to be set.

column Step IDs

The column Step IDs whose values are to be set.

values

The values to set in the target cells.

To construct a Script Instruction using Flkw:SetTableRowValidatedValues

  • Select JS Execute from the Instruction dropdown list. In the Expression field, enter the Flkw:SetTableRowValidatedValues Instruction as shown.

    SetValidatedRow1.png

The Flkw:SetTableRowValidatedValues is added to the Script.

SetValidatedRow2.png

At runtime, the Script sets the value of the specified cells with the values NewValue1 and NewValue2 as shown below.

SetValidatedRow3.png

Note that the Script validates the values. The user is not required to validate the entries.