IDimIndexes.FindByKey

Syntax

FindByKey(IndexKey: Integer): IDimIndex;

Parameters

IndexKey — index key on which the search is based.

Description

The FindByKey method searches index, which key is passed by the IndexKey parameter.

Example

Sub Main;

Var

MB: IMetabase;

DimModel: IDimensionModel;

Indexs: IDimIndexes;

Index: IDimIndex;

s: String;

Begin

MB:=MetabaseClass.Active;

DimModel:=MB.ItemById("D_TO").Bind As IDimensionModel;

Indexs:=DimModel.Indexes;

Index:=Indexs.FindByKey(3);

If Index<>Null Then

s:=Index.Id;

Else

s:="It is not found";

End If;

End Sub Main;

After executing the example the method searches for index with the key 3, and the "s" variable shows identifier of the found index if the search is successful. Repository object identifier: D_TO.

See also:

IDimIndexes