IRdsDictionaryElementData.DisplayAttribute

Fore Syntax

DisplayAttribute(AttributeKey: Integer): Variant;

Fore.NET Syntax

DisplayAttribute[AttributeKey: UInteger]: Object;

Parameters

AttributeKey - attribute key, by which it is necessary to get a displayed value.

Description

The DisplayAttribute property returns a value that is displayed by an attribute with the AttributeKey key for an element.

Fore Example

Executing the example requires an MDM repository with the NSI_1 identifier. The MDM dictionary with the Dict_1 identifier is created in this repository.

Sub UserProc;
Var
    MB: IMetabase;
    DictInst: IRdsDictionaryInstance;
    Element: IRdsDictionaryElement;
Begin
    MB := MetabaseClass.Active;
    DictInst := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Open(NullAs IRdsDictionaryInstance;
    Element := DictInst.Elements.Item(1);
    Debug.WriteLine(Element.DisplayAttribute(DictInst.Attributes.FindById("NAME").Key));
End Sub UserProc;

After executing the example a value, that is displayed for a specified dictionary element by attribute name, is displayed in the development environment console.

Fore.NET Example

Executing the example requires an MDM repository with the NSI_1 identifier. The MDM dictionary with the Dict_1 identifier is created in this repository.

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    DictInst: IRdsDictionaryInstance;
    Element: IRdsDictionaryElement;
    NameValue: object;
Begin
    MB := Params.Metabase;
    DictInst := MB.ItemByIdNamespace["Dict_1", MB.ItemById["NSI_1"].Key].Open(NullAs IRdsDictionaryInstance;
    Element := DictInst.Elements.Item[1];
    NameValue := Element.DisplayAttribute[DictInst.Attributes.FindById("NAME").Key];
End Sub;

After executing the example a value, that is displayed for a specified dictionary element by attribute name, is displayed in the NameValue variable.

See also:

IRdsDictionaryElementData