IStandardDimIndexes.FindByKey

Syntax

FindByKey(IndexKey: Integer): IStandardDimIndex;

Parameters

IndexKey.Key of the index, by which search is executed.

Description

The FindByKey method searches and returns an object containing table dictionary index. Search is executed by the key passed by the IndexKey parameter.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Dim: IStandardDimension;
    DimInds: IStandardDimIndexes;
    DimIndex: IStandardDimIndex;
    s: String;
Begin
    MB:=MetabaseClass.Active;
    Dim:=MB.ItemById("TAB_DIM").Bind As IStandardDimension;
    DimInds:=Dim.Indexes;
    If DimInds.Count<>0 Then
        DimIndex:=DimInds.FindByKey(5014);
        If DimIndex<>Null Then
            s:=DimIndex.Name;
        End If;
    End If;
End Sub UserProc;

After executing the example the method searches for the index with the 5014 key, and if the search is successful, the "s" variable contains the name of dictionary index found. Table dictionary identifier: TAB_DIM.

See also:

IStandardDimIndexes