Skip to main content
Version: 20 R5 BETA

VP Get table column index

History
ReleaseChanges
19 R7Added

VP Get table column index ( vpAreaName : Text ; tableName : Text ; columnName : Text {; sheet : Integer } ) : Integer

ParameterTypeDescription
vpAreaNameText->4D View Pro area form object name
tableNameText->Table name
columnNameText->Name of the table column
sheetInteger->Sheet index (current sheet if omitted)
ResultInteger<-Index of columnName

Description

The VP Get table column index command returns the index of the columnName in the tableName.

In vpAreaName, pass the name of the 4D View Pro area.

In columnName, pass the name of the table column for which you want to get the index.

In sheet, pass the index of the target sheet. If no index is specified or if you pass -1, the command applies to the current sheet.

Indexing starts at 0.

If tableName or columnName is not found, the command returns -1.

Example

    // Search the column id according the column name
var $id : Integer
$id:=VP Get table column index($area; $tableName; "Weight price")
// Remove the column by id
VP REMOVE TABLE COLUMNS($area; $tableName; $id)

See also

VP CREATE TABLE
VP Find table
VP Get table column attributes
VP SET TABLE COLUMN ATTRIBUTES