IDimIndexInstanceLookup.LookUp

Syntax

LookUp: IDimElementArray;

Description

The LookUp method searches for elements meeting certain condition and returns an array of found elements.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Dimen: IDimInstance;
    IndxsInst: IDimIndexesInstance;
    IndexInst: IDimIndexInstance;
    InstLook: IDimIndexInstanceLookup;
    LookElem: IDimElementArray;
    i: Integer;
Begin
    MB:=MetabaseClass.Active;
    Dimen:=MB.ItemById("D_TO").Open(NullAs IDimInstance;
    IndxsInst:=Dimen.Indexes;
    If IndxsInst.Count<>0 Then
        IndexInst:=IndxsInst.Item(0);
        InstLook:=IndexInst.CreateDimIndexLookup;
        InstLook.AttributeValue(0):=10;
        LookElem:=InstLook.LookUp;
        i:=LookElem.Count;
    End If;
End Sub UserProc;

After executing the example the search is carried out by attribute of the first dictionary index. Searched value: 10. If the search is successful, the "i" variable shows the number of found elements.

See also:

IDimIndexInstanceLookup