FindByKey(IndexKey: Integer): IUserDimIndex;
IndexKey — index key on which the search is based.
The FindByKey method searches and returns an object containing calculated dictionary index. The search is based on the key passed by the IndexKey parameter.
Sub Main;
Var
MB: IMetabase;
UsDim: IUserDimension;
UsDimInds: IUserDimIndexes;
UsDimIndex: IUserDimIndex;
s: String;
Begin
MB:=MetabaseClass.Active;
UsDim:=MB.ItemById("USER_DIM").Bind As IUserDimension;
UsDimInds:=UsDim.Indexes;
If UsDimInds.Count<>0 Then
UsDimIndex:=UsDimInds.FindByKey(5320);
If UsDimIndex<>Null Then
s:=UsDimIndex.Name;
End If;
End If;
End Sub Main;
After executing the example the method searches for the index with the 5320 key, and if the search is successful, the "s" variable contains the name of dictionary index found. Calculated dictionary identifier: USER_DIM.
See also: