AddField;
The AddField method adds an index field.
Sub Main;
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(0) As 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 Main;
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: