DisplayAttribute(AttributeKey: Integer): Variant;
DisplayAttribute[AttributeKey: UInteger]: Object;
AttributeKey - attribute key, by which it is necessary to get a displayed value.
The DisplayAttribute property returns a value that is displayed by an attribute with the AttributeKey key for an element.
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(Null) As 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.
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(Null) As 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: