Skip to main content

FieldLogs

Table

The Table Instructions allow the manipulation of the current values of Tables in Template Steps.

The Table category includes two types of Script Instructions:

  1. Add New Row in Table

  2. Get Last Row of Table

Note

These Table Instructions should be invoked in Steps following the selected Table Step. The user needs to have entered at least some data in the Table before these Table Instructions can be invoked.

Add New Row in Table is a Table Instruction that adds a new Row at the end of the selected Table. It also stores its Row Index in a Local Variable.

To construct a Script Instruction using Add New Row in Table:

  1. Select Add New Row in Table from the Instruction dropdown list. Options Table Step and Variable Name appear as seen below.

    AddNewRowTable1.png
  2. Select the Table Step of the Template to which a new row has to be added using the Table Step dropdown list. Enter the name of a Local Variable that stores the Row Index of the added row in the Variable Name field.

    In the below example:

    At runtime, after the current Step (Step 2) is validated, a new row is added to the Table step ( Step 1 Battery Details).

    AddNewRowinTable2.png

    The Add New Row in Table Script Instruction is added to the Script.

    AddNewRowinTable3.png

    At runtime, the user enters a row in Step 1 and proceeds to validate Step 2.

    AddNewRowTable4.png

    Once Step 2 is validated, a row is added to the Table in Step 1.

    AddNewRowTable5.png

Get Last Row of Table is a Table Instruction that gets the row index of the last Row of the selected Table and stores it in a Local Variable.

Note

The index of the last row of a Table is the same as the Table's row count. If a Table Step has 5 rows, the index of the last row is also 5.

To construct a Script Instruction using Get Last Row of Table:

  1. Select Get Last Row of Table from the Instruction dropdown list. Options Table Step and Variable Name appear as seen below.

    GetLastRowinTable1.png
  2. From the Table Step dropdown list, select the Table Step of the Template whose Last Row Index needs to be obtained. In the Variable Name field, enter the name of a Local Variable that stores the Table Step's Last Row Index.

    In the below example:

    At runtime, the Local Variable indexOfLastRow holds the index of the last row of the Table.

    GetLastRowinTable3.png

The Get Last Row of Table Script Instruction is added to the Script.

GetLastRowinTable4.png

Note

Although the Instruction dropdown list includes two additional Table Instructions Set Value in Cell of Table and Get Value of Cell of Table, they do not work at the moment.

This is a known issue.