IUserDimLevels.FindByKey

Syntax

FindByKey(IndexKey: Integer): IUserDimLevel;

Parameters

IndexKey — dictionary level key on which the search is based.

Description

The FindByKey method searches and returns the object containing calculated dictionary level.

Example

Sub Main;

Var

MB: IMetabase;

UsDim: IUserDimension;

UsDimLevs: IUserDimLevels;

UsDimLevel: IUserDimLevel;

s: String;

Begin

MB:=MetabaseClass.Active;

UsDim:=MB.ItemById("USER_DIM").Bind As IUserDimension;

UsDimLevs:=UsDim.Levels;

UsDimLevel:=UsDimLevs.FindByKey(5352);

If UsDimLevel<>Null Then

s:=UsDimLevel.Name;

End If;

End Sub Main;

After executing the example the method searches for the dictionary level with the 5352 key, and if the search is successful the "i' variable contains the name of the level found. Calculated dictionary identifier: USER_DIM.

See also:

IUserDimLevels