ITableIndexFields.Remove

Syntax

Remove(Value: ITableField);

Parameters

Value is a table field.

Description

The Remove method removes the field from table index.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Table: ITable;

Index: ITableIndex;

IndexFields: ITableIndexFields;

Field: ITableField;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("TABLE_1").Edit;

Table := MObj As ITable;

Index := Table.Indexes.Item(0);

IndexFields := Index.Fields;

Field := IndexFields.Item(0);

IndexFields.Remove(Field);

MObj.Save;

End Sub Main;

After executing the example, the first field of the table by that it was created is removed from index. The table identifier is Table_1.

See also:

ITableIndexFields