IEtlPlainIndex.AddField

Syntax

AddField;

Description

The AddField method adds an index field.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Object: IMetabaseObject;
    EtlTask: IEtlTask;
    Join: IEtlPlainDataJoin;
    Index: IEtlPlainIndex;
Begin
    MB := MetabaseClass.Active;
    Object := MB.ItemById("ETL").Edit;
    EtlTask := Object As IEtlTask;
    Join := EtlTask.Item(0As IEtlPlainDataJoin;
    Index := Join.Index;
    Index.AddField;
    Index.PlainInputField(0,0):=Join.PlainInputs.Item(0).Fields.Item(0);
    Index.PlainInputField(0,1):=Join.PlainInputs.Item(1).Fields.Item(0);
    Object.Save;
End Sub UserProc;

After executing the example an index field is created and two fields are added into it: the first field of the first input and the first field of the second input of ETL task object. The repository object has the ETL identifier.

See also:

IEtlPlainIndex