IUserDimAttributes.FindByKey

Syntax

FindByKey(AttributeKey: Integer): IUserDimAttribute;

Parameters

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

Description

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

Example

Sub Main;

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 Main;

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