Gets the index of a column based on its name.
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.
Rule | Meaning |
---|---|
TableGetColumnIndexByName(DWGroupTableCustomers,"customername") | From the table below this will return the column index 1, ignoring the case of the specified column name. |
TableGetColumnIndexByName(DWGroupTableCustomers,"city",TRUE) | From the table below this will return the column index 2, ignoring the case of the specified column name. |
TableGetColumnIndexByName(DWGroupTableCustomers,"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. |
DWGroupTableCustomers
CustomerName | City | Country |
---|---|---|
Amazon Warriors | Paris | France |
Bolton Burners | Boston | United States |
Boston Bulls | Hanover | Germany |
Cambridge Cats | Paris | France |