IMetaAttributeSetting.DimHierarchy

Syntax

DimHierarchy: IDimHierarchyInstance;

Description

The DimHierarchy property determines attribute hierarchy.

Comments

Use the IMetaAttributeSetting.ShowAttribute property to determine whether the specified MDM dictionary attribute is visible in the drop-down list of values of time series database attribute.

Example

Executing the example requires a form, a button named Button1 on the form and the MetaAttributesBreadcrumb component named MetaAttributesBreadcrumb1. The repository must contain a time series database with the DIM_HIERARCHY identifier. The database must contain a custom attribute referring to the dictionary with configured alternative hierarchy. At least one dictionary element must be selected for the MetaAttributesBreadcrumb1 component. The example is the OnClick event handler for the Button1 component. Add links to the Cubes, Dimensions, ExtCtrls, Forms, Rds system assemblies.

Add links to the Metabase and Dimensions system assemblies.

Sub SAMPLEFormOnCreate(Sender: Object; Args: IEventArgs);
Var
    MB: IMetabase;
    RubInst: IRubricatorInstance;
Begin
    MB := MetabaseClass.Active;
    RubInst := MB.ItemById("DIM_HIERARCHY").Open(NullAs IRubricatorInstance;
    MetaAttributesBreadcrumb1.Rubricator := RubInst;
End Sub SAMPLEFormOnCreate;

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Items: IBreadcrumbItems;
    Item: IMetaAttributeBreadcrumbItem;
    Attr: IMetaAttribute;
    AttrS: IMetaAttributeSettings;
    AttrSett: IMetaAttributeSetting;
    DimInst: IDimInstance;
Begin
    Items := MetaAttributesBreadcrumb1.Items;
    Item := Items.Item(0As IMetaAttributeBreadcrumbItem;
    Attr := Item.MetaAttribute;
    DimInst := Attr.ValuesObject.Open(NullAs IDimInstance;
    AttrS := MetaAttributesBreadcrumb1.MetaAttributeSettings;
    AttrSett := AttrS.FindByAttribute(Attr);
    AttrSett.DimHierarchy := DimInst.Hierarchies.Item(0);
End Sub Button1OnClick;

After executing the example the alternative hierarchy is applied to the displayed dictionary elements:

See also:

IMetaAttributeSetting