IUserDimAttribute.HasHierarchy

Fore Syntax

HasHierarchy: Boolean;

Fore.NET Syntax

HasHierarchy: boolean;

Description

The HasHierarchy property determines whether attribute is used as alternative hierarchy.

Comments

Available values:

Fore Example

Executing the example requires that repository contains calculated dictionary with the DIM_CALCULATED identifier which contains attribute with the NAME identifier.

Add links to the Dimensions, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    userDim: IUserDimension;
    attrs: IUserDimAttributes;
    attr: IUserDimAttribute;
Begin
    // Get repository
    mb := MetabaseClass.Active;
    // Get calculated dictionary
    userDim := MB.ItemById("DIM_CALCULATED").Edit As IUserDimension;
    // Get collection of attributes
    attrs := userDim.Attributes;
    // Get the Name attribute
    attr := attrs.Item("NAME");
    // Set attribute as alternative hierarchy
    attr.HasHierarchy := True;
    // Save changes
    (userDim As IMetabaseObject).Save;
End Sub UserProc;

After executing the example attribute will be used as alternative hierarchy.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Dimensions;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    userDim: IUserDimension;
    attrs: IUserDimAttributes;
    attr: IUserDimAttribute;
Begin
    // Get repository
    mb := Params.Metabase;
    // Get calculated dictionary
    userDim := MB.ItemById["DIM_CALCULATED"].Edit() As IUserDimension;
    // Get collection of attributes
    attrs := userDim.Attributes;
    // Get the Name attribute
    attr := attrs.Item["NAME"];
    // Set attribute as alternative hierarchy
    attr.HasHierarchy := True;
    // Save changes
    (userDim As IMetabaseObject).Save();
End Sub;

See also:

IUserDimAttribute