Aller au contenu principal
Version: Next

VP Get table column index

Historique
ReleaseModifications
19 R7Ajout

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

ParamètresTypeDescription
vpAreaNameText->Nom d'objet formulaire zone 4D View Pro
tableNameText->Nom de table
columnNameText->Nom de la colonne de la table
sheetInteger->Numéro d'indice de la feuille (feuille courante si omis)
RésultatInteger<-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. Si aucun numéro n'est spécifié ou si vous passez -1, la commande s'applique à la feuille courante.

La numérotation démarre à 0.

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

Exemple

    // 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)

Voir également

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