FindByKey(IndexKey: Integer): IStandardDimIndex;
IndexKey. Index key on which the search is based.
The FindByKey method searches and returns an object containing table dictionary index. The search is based on the key passed by the IndexKey parameter.
Sub Main;
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 Main;
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: