IRdsDictionaryElements.Name

Syntax

Name(Element: Integer): String;

Parameters

Element - element key.

Description

The Name property returns value of the Name attribute, which key is passed by the Element parameter.

Example

Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
    Dict: IRdsDictionary;
    DictInst: IRdsDictionaryInstance;
    Elements: IRdsDictionaryElements;
    Arr: IRdsDictionaryElementArray;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    Dict := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;
    DictInst := Dict.Open(Null);
    Elements := DictInst.Elements;
    Arr := Elements.Children(Elements.Item(1).Key);
    For Each i In Arr Do
        Debug.WriteLine(Elements.Name(i));
    End For;
End Sub Button1OnClick;

After executing the example values of the Name attribute are displayed in the console for all child elements of the first root element of a dictionary.

See also:

IRdsDictionaryElements