table selected columns, table selected column numbers, table selected headers
This function searches the contents in one specified table row and returns the following:
With table selected columns: Actual values in the columns where the matches are successful
With table selected column numbers: The column numbers where where the matches are successful
With table selected column numbers: The corresponding header names of the columns where matches are successful
Attention: All values from the table being compared are strings, even if they contain numbers.
Indirect parameter passing is disabled
2-4
No. | Type | Description |
---|---|---|
1. input |
string | Name of existing table |
2. code |
comparison expression :string |
Value compared with the table contents This parameter is a piece of code typically found on the right-hand side of a comparison with '=' or '<>'. Single values, ranges (e.g. 3..5), multiple values separated by commas are supported. For text comparison, wildcards are supported if the string is of type softquoted string. |
Opt. 3. input |
numeral | Row number Specifies the row number where to carry out the comparisons Default value: 0 |
Opt. 4 input |
table column | Existing column See table columns as function parameters for general ruling for this parameter.
|
Type | Description |
---|---|
set | Retrieved values Contains strings or numerals, depending on the function name used. |
table initialize( table 1,
{ { Last Name, 1st Name, Street, Town, Postal Code, "Spouse's Name", Zip Code },
{ Miller, Phil, Main St., Denver, 80208, Ann, 80123 } } );
echo( table selected columns( table 1, '*Code' ) );
// If the comparison expression is not the last function parameter, then put it into
// parentheses to avoidi including further parameters used in the comparison process.
echo( table selected columns( table 1, (=80208), 1 ) );
echo( table selected headers( table 1, ( '80*' ), 1 ) );
echo( table selected column numbers( table 1, ( '80*' ), 1, 5 ) ); // Column 4 skipped
{'Postal Code','Zip Code'}
{80208}
{'Postal Code','Zip Code'}
{6}