Altair® Monarch®

 

Function: Rowno

Description

Returns a record's table row number from the currently displayed table. This function differs from the Recno function in that row numbers are reassigned each time you sort or filter the table while record numbers are assigned only when the table is created.

Syntax

Rowno()

Arguments

None.

Return value

This function returns a number.

Calculated field example

The following calculated field expression creates a calculated field which displays the row number of each record in the currently displayed table. This is useful if you need to export the row numbers as a field: Rowno()

Find example

You can jump directly to row 1000 in the table using the find expression: Rowno()=1000

Note: The Rowno function cannot be used in a filter expression.

 

RowNo versus RecNo

RowNo is a filter-sensitive row number, whereas RecNo is a filter-insensitive row number.

Essentially, if you filtered a dataset with 10 rows down to 5 rows, with RecNo you might see something like:

2

4

6

7

11

With RowNo, you would see:

1

2

3

4

5

Note that in DPS, RecNo refers to the line number from the table node on which the formula is being evaluated before any changes (like filters) are applied to the node.

This means that if you create a sort, for  example, a call to RecNo from a formula in that sort's change list would mean the number of the row before any of the changes were applied on top of that sort.

Likewise, RowNo starts as a sequential line number on each new table node. Its value would be evaluated differently depending on what filter changes exist before it in the node on which the formula is being evaluated.

This means that if you make a sort, for example, a call to RowNo from a formula in that sort's change list would mean the number of the row after eliminating rows which are filtered out by a filter before the RowNo call in that node's change list.