Show contents 

Db > Db Assembly Interfaces > ITableFields > ITableFields.FieldByKey

ITableFields.FieldByKey

Syntax

FieldByKey(Key: Integer): ITableField;

Parameters

Key is field key.

Description

The FieldByKey method executes transition to a table field. The field key is passed by the Key parameter.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Table: ITable;
    Fields: ITableFields;
    Field: ITableField;
    s: String;
Begin
    MB:=MetabaseClass.Active;
    Table:=MB.ItemById("TABLE_1").Bind As ITable;
    Fields:=Table.Fields;
    Field:=Fields.FieldByKey(10);
    s:=Field.Name;
End Sub UserProc;

After executing the example, the "s" variable contains name of the field, key of which equals 10. The table identifier is Table_1.

See also:

ITableFields