Show contents 

Home > Foresight Analytics Platform > Web Application and Desktop Application > Application Development and Functionality Enhancement > Developing in Development Environment > Description of System Assemblies > Db > Db Assembly Interfaces > ITableIndex > ITableIndex.Fields

ITableIndex.Fields

Syntax

Fields: ITableIndexFields;

Description

The Fields property returns the collection of table fields by which the index is created.

Example

Executing the example requires that the repository contains a table with the Table_1 identifier. The table contains at least two fields.

Sub UserProc;
Var
    MB: IMetabase;
    Table: ITable;
    Fields: ITableFields;
    Index: ITableIndex;
Begin
    MB := MetabaseClass.Active;
    Table := MB.ItemById("Table_1").Edit As ITable;
    Fields := Table.Fields;
    Index := Table.Indexes.Add;
    Index.Fields.Add(Fields.Item(0));
    Index.Fields.Add(Fields.Item(1));
    Index.Primary := True;
    (Table As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, the primary index is created in the table. This index is created by two first fields of the table.

See also:

ITableIndex