IStandardDimAttributes.FindByKey

Syntax

FindByKey(AttributeKey: Integer): IStandardDimAttribute;

Parameters

AttributeKey - key of the attribute, on which the search is based.

Description

The FindByKey method searches and returns the object that contains the attribute of the table dictionary. Search is executed by the key passed by the AttributeKey parameter.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Dimens: IStandardDimension;
    DimAtrrs: IStandardDimAttributes;
    DimAtribut: IStandardDimAttribute;
    s: String;
Begin
    MB:=MetabaseClass.Active;
    Dimens:=MB.ItemById("TAB_DIM").Bind As IStandardDimension;
    DimAtrrs:=Dimens.Attributes;
    DimAtribut:=DimAtrrs.FindByKey(4796);
    If DimAtribut<>Null Then
        s:=DimAtribut.Name;
    Else
        s:="It is not found";
    End If;
End Sub UserProc;

After executing the example the method searches for the attribute with the 4796 key, and if the attribute is found, the "s" variable contains its name. Table dictionary identifier: TAB_DIM.

See also:

IStandardDimAttributes