CreateDimIndexLookup: IDimIndexInstanceLookup;
The CreateDimIndexLookup method creates an object used to find dictionary elements.
Sub Main;
Var
MB: IMetabase;
Dimen: IDimInstance;
IndxsInst: IDimIndexesInstance;
IndexInst: IDimIndexInstance;
InstLook: IDimIndexInstanceLookup;
i: Integer;
Begin
MB:=MetabaseClass.Active;
Dimen:=MB.ItemById("D_TO").Open(Null) As IDimInstance;
IndxsInst:=Dimen.Indexes;
If IndxsInst.Count<>0 Then
IndexInst:=IndxsInst.Item(0);
InstLook:=IndexInst.CreateDimIndexLookup;
InstLook.AttributeValue(0):=10;
i:=InstLook.LookUpFirst;
End If;
End Sub Main;
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 contains the number of the found element.
See also: