FindByKey(IndexKey: Integer): IUserDimIndex;
IndexKey. Index key used for search.
The FindByKey method searches and returns an object containing calculated dictionary index. Search is executed by the key passed by the IndexKey parameter.
Sub UserProc;
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 UserProc;
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: