row

Property is read-only. It cannot be set in script.
  • table for more information about the table array.

  • Table Properties for general information about the Table component.

Returns the row index of the cell currently referenced by a Format expression script. For example, if you specify a ‘Color’ expression in the Format panel for a detail cell in a Table, you can use the row property within the script to obtain the index of the row. (The index will change as the expression is evaluated in turn for each detail cell in the column.) This, together with table array and the col property allow you to construct relative references to other cells in the Table.

See Control Properties with Expression for information about how to use expressions to set properties.

Example

The script below can be used in a ‘Color’ or ‘Background’ expression to set color formatting on a Table detail cell. It assigns a red color if the value in the cell is less than the value of the same cell in the row above, and assigns a green color otherwise.

if (row > 1) {
  if (value > table[row-1][col]) {
    [255,0,0]
  }
  else {
    [0,255,0]
  }
}