IDimIndexes.FindById

Syntax

FindById(IndexId: String): IDimIndex;

Parameters

IndexId — index ID on which the search is based.

Description

The FindById method searches index, which identifier is passed by the IndexId 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.FindById("INDEX3");

If Index<>Null Then

s:=Index.Name;

Else

s:="It is not found";

End If;

End Sub Main;

After executing the example the method searches for the index with the INDEX3 identifier; if the index is found, the "s" variable shows its name. Repository object identifier: D_TO.

See also:

IDimIndexes