If you are writing such scripts, consider using explicit scoping and namespaces. See Advanced Scoping and Namespaces in Programming Methods for more information.
When a column has been assigned to a global variable, assign a value to a cell in the column using a subscript. Suppose that the name of the column height has been assigned to the x variable:
x = Column( "height" );
Assign a value to the third row in the height column as follows:
x[3] = 64 // sets the third row of height to 64
Note: The current row in a JSL script is not determined by selecting rows or positioning your cursor in the row. The current row is defined to be zero (no row) by default. You can set a current row with Row() (for example, Row() = 3). Please note that such a setting only lasts for the duration of that script. Then, Row() reverts to its default value, zero. This behavior means that submitting a script all at once can produce different results than submitting a script a few lines at a time.
Another way to establish a current row for a script is to enclose it in For Each Row(). This method executes the script once for each row of the current data table. For an example, see If. See Data Tables topic for more information about working with data tables.
|
dataTable:colName[i]
(dataTable:colName)[i]