table selected rows, table all selected rows
This function obtains the row numbers of the selected rows and returns them as a set containing numerals. Row 0 (header row) is not checked.
This function is very useful for searching contents in known columns and retrieving all matches.
The all in the function name includes row 0 in the selection process. Otherwise it begins at row 1.
Indirect parameter passing is disabled
This function provides a table context for partial table specifications with table name and row number for selected function parameters
2
No. | Type | Description |
---|---|---|
1. input |
string | Name of existing table |
2. code |
expression :string |
Expression to select rows Applicable to function table copy columns selected rows only.
Specify the conditions or rules to select the rows. See expressions to select rows. |
Type | Description |
---|---|
set | Retrieved row numbers The set contains numerals. An empty set is returned if there are no matches. |
table initialize ( table 1, { { Animal, leg count },
{ Worm, 0}, { Bird, 2 }, { Dog, 4 }, { Fly, 6 }, { Tick, 8 } } );
echo( table selected rows( table 1, mod( [leg count], 4 ) = 0 ) );
// Leg countsa are 0, 4, 8, row numbers are 1, 3, 5.
echo( table selected rows( table 1, ([Animal]='B*','D*') ) );
// Returns rows 2 and 3.
{1,3,5}
{2,3}
table read column selected rows
table search row
table selected columns