This function searches a table for the specified text in a column and returns the row index of its first occurrence.
This can be useful for finding the position of unique values within your table.
SppTableRowIndexOfValue([Table Array],[Column],[Search Text],[Ignore Case])
Where:
Table Array is a Table Array (such as the data in a standard table or the result of a QueryDataValues function).
Column is the column index on which to search.
Search Text is the text to find, must match exactly.
Ignore Case is True to perform a case sensitive search.
| Rule | Result | Meaning |
|---|---|---|
| SppTableRowIndexOfValue(DwLookupOfficeSupplies,1,"2B Pencil",TRUE) | 2 | Will search in the first column of the table Office Supplies, for the text 2B Pencil and return the Row Index 2. |
| Item | Price | Quantity |
|---|---|---|
| HB Pencil | 0.60 | 3 |
| 2B Pencil | 0.60 | 2 |
| Black Biro | 0.80 | 1 |
| Rubber | 1.50 | 1 |
| HB Pencil | 0.60 | 2 |
| Black Biro | 0.80 | 1 |