hub.eb?material_id=68

Current row concept


The current row refers to the active row in a table and gets automatically set by Verj.io as it executes an application.

For example, you may have a hyperlink column in a table row and when you click it Verj.io will set that row to be the current row. This means that when you now refer to columns in the row, e.g. tables.myTable.myColumn.value, your processing will be working against this row.

Steps


1

If you haven't already, create a basic 3 column table called myTable in the Verj.io Studio, and populate it in a Before Table script called myTableScript using the following code:

tables.myTable.A.value="A1";
tables.myTable.B.value="B1";
tables.myTable.C.value="C1";
tables.myTable.insertRow();
tables.myTable.A.value="A2";
tables.myTable.B.value="B2";
tables.myTable.C.value="C2";
tables.myTable.insertRow();
tables.myTable.A.value="A3";
tables.myTable.B.value="B3";
tables.myTable.C.value="C3";

Go to Introduction to Tables tutorials

2

In the studio, drag and drop a button column onto the table. 

3

Now drag the A column from the Tables tab onto your page as a field, i.e. not a part of the table.

Run the form and note that the value of the field is the first value of column A. This is because Verj.io has automatically set the first row of the table to be the current row. 

4

Now click the button on the next row, and the value of the field becomes the second column A value. This is because clicking the button has made this row active, i.e. the current row. 

Related