Skip to main content

GetDataTableColumnIndex

Use this function to retrieve the column index of a specified column in a DataTable object. If the column specified does not exist, the return result is -1.

Syntax:

GetDataTableColumnIndex (DataTableName, "ColumnName")

where:

  • DataTableName is the name of the DataTable object in which to get the column index.
  • ColumnName is the name of the column for which to get the index, enclosed in double quotation marks ("").

Syntax example:

Create Variable colIndex as NUM

Set Variable colIndex = GetDataTableColumnIndex (SalaryTable, "StartDate")

Was this article helpful?

We're sorry to hear that.