IUserDimAttributes.FindByKey

Syntax

FindByKey(AttributeKey: Integer): IUserDimAttribute;

Parameters

AttributeKey. Attribute key used for search.

Description

The FindByKey method searches and returns an object containing calculated dictionary attribute. Search is executed by the key passed by the AttributeKey parameter.

Example

Sub UserProc;
Var
    MB: IMetabase;
    UsDim: IUserDimension;
    UsDimAts: IUserDimAttributes;
    UsDimAttr: IUserDimAttribute;
    s: String;
Begin
    MB:=MetabaseClass.Active;
    UsDim:=MB.ItemById("USER_DIM").Bind As IUserDimension;
    UsDimAts:=UsDim.Attributes;
    UsDimAttr:=UsDimAts.FindByKey(5253);
    If UsDimAttr<>Null Then
        s:=UsDimAttr.Name;
    Else
        s:="It is not found";
    End If;
End Sub UserProc;

After executing the example the method searches for the attribute with the 5253 key, and if the search is successful, the "s" variable contains the name of the attribute found. Calculated dictionary identifier: USER_DIM.

See also:

IUserDimAttributes