IDimIndexesInstance.FindById

Syntax

FindById(IndexId: String): IDimIndexInstance;

Parameters

IndexId - index ID on which the search is based.

Description

The FindById method searches and returns object containing dictionary index. The search is based on the identifier passed as the IndexId parameter.

Example

Sub Main;

Var

MB: IMetabase;

Dimen: IDimInstance;

Indxs: IDimIndexesInstance;

Index: IDimIndexInstance;

i: Integer;

Begin

MB := MetabaseClass.Active;

Dimen := MB.ItemById("D_TO").Open(Null) As IDimInstance;

Indxs := Dimen.Indexes;

If Indxs.Count <> 0 Then

Index := Indxs.FindById("INDEX1");

If Index <> Null Then

i := Index.Index.Key;

End If;

End If;

End Sub Main;

After executing the example the method searches for the index with the Index1 identifier; if successful, the "i" variable shows key of the found index.

See also:

IDimIndexesInstance