IDimElements.Name

Syntax

Name(Element: Integer): String;

Parameters

Element — index of dictionary element.

Description

The Name property returns value of Name attribute for the element with the Element index.

Comments

The IDimAttributeInstance.DisplayValue property is used to get value of this property.

If alternative hierarchy is set for a dictionary, this property cannot be used to get element's name.

Example

Executing the example requires that the repository contains a dictionary with the D_TO identifier.

Add links to the Metabase and Dimensions system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Dimen: IDimInstance;
    Elem: IDimElements;
    s: String;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    Dimen := MB.ItemById("D_TO").Open(NullAs IDimInstance;
    Elem := Dimen.Elements;
    For i := 0 To Elem.Count - 1 Do
        s := Elem.Name(i) + "; ";
        Debug.WriteLine(s);
    End For;
End Sub UserProc;

After executing the example the console window shows values of the Name attribute of the dictionary element.

See also:

IDimElements