Publication date: 08/13/2020

Find Rows

Get Rows returns a matrix of rows that match the specified condition. The following example select rows in which the age is greater than or equal to 16:

dt = Open( "$SAMPLE_DATA/Big" );
dt << Get Rows Where( :age >= 16 );

[35, 36, 37, 38, 39, 40]

Get Selected Rows returns a matrix of the currently selected rows. The following example selects rows 1, 3, 5, and 7 and then returns the row numbers in a matrix:

dt << Select Rows( {1, 3, 5, 7} );
dt << Get Selected Rows;

[1, 3, 5, 7]

Find Selected Rows

Next Selected and Previous Selected scroll the data table window up or down so that the next selected row that is not already in view moves into view. The table wraps, so Next Selected jumps from the bottom-most selected row to the top-most, and vice versa for Previous Selected.

dt << Next Selected;
dt << Previous Selected;

Clear Selected Rows

To cancel a selection, leaving no rows selected, use Clear Select, as follows:

dt << Clear Select;
Want more information? Have questions? Get answers in the JMP User Community (