ITableFields.FindById

Syntax

FindById(Id: String): ITableField;

Parameters

Id is field identifier.

Description

The FindById method searches and returns an object containing a field of the table. The identifier, by which the search is performed, is passed by the Id parameter.

Example

Sub Main;

Var

MB: IMetabase;

Table: ITable;

Fields: ITableFields;

Field: ITableField;

i: Integer;

Begin

MB:=MetabaseClass.Active;

Table:=MB.ItemById("TABLE_1").Bind As ITable;

Fields:=Table.Fields;

Field:=Fields.FindById("Pole1");

i:=Field.Key;

End Sub Main;

After executing the example, the "i" variable contains the key of the field with the Pole1 identifier. The table identifier is Table_1.

See also:

ITableFields