DriveWorks Solo 15: TableGetColumnIndexByName [send feedback...]

TableGetColumnIndexByName

Gets the index of a column based on its name.

Syntax

TableGetColumnIndexByName(Table or Table Name, Column Name, Ignore Case)

Where:

Table or Table Name is the Table in which to lookup the index of the column.

Column Name is the name of the column to find the index of.

Ignore Case (Optional) is TRUE (or blank) to ignore case, FALSE to be case sensitive.

Examples

RuleMeaning
TableGetColumnIndexByName(DWLookupCustomers,"customername")From the table below this will return the column index 1, ignoring the case of the specified column name.
TableGetColumnIndexByName(DWLookupCustomers,"city",TRUE)From the table below this will return the column index 2, ignoring the case of the specified column name.
TableGetColumnIndexByName(DWLookupCustomers,"Country",FALSE)From the table below this will return the column index 3, matching the case of the specified column name.
If the case does not match, or the column name is not found, #Value! will be returned.

Example Data

DWLookupCustomers

CustomerNameCityCountry
Amazon WarriorsParisFrance
Bolton BurnersBostonUnited States
Boston BullsHanoverGermany
Cambridge CatsParisFrance


Table of Contents