ICalendarDimAttribute.HasHierarchy

Fore Syntax

HasHierarchy: Boolean;

Fore.NET Syntax

HasHierarchy: boolean;

Description

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

Comments

Available values:

Fore Example

Executing the example requires that the repository contains calendar dictionary with the DIM_CALENDARR identifier. Create attribute with the ATTR identifier.

Add links to the Dimensions, Metabase system assemblies.

Sub UserProc;
Var

    mb: IMetabase;
    calendarDim: ICalendarDimension;
    userAttrs: ICalendarDimAttributes;
    userAttr: ICalendarDimAttribute;
Begin
    // Get repository
    mb := MetabaseClass.Active;
    // Get calendar dictionary
    calendarDim := MB.ItemById("DIM_CALENDARR").Edit As ICalendarDimension;
    // Get collection of attributes
    userAttrs := CalendarDim.Attributes;
    // Get custom attribute
    userAttr := UserAttrs.Item("ATTR");
    // Set attribute as alternative hierarchy
    userAttr.HasHierarchy := True;
    // Save changes
    (calendarDim As IMetabaseObject).Save;
End Sub UserProc;

After executing the example custom 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;
    calendarDim: ICalendarDimension;
    userAttrs: ICalendarDimAttributes;
    userAttr: ICalendarDimAttribute;
Begin
    // Get repository
    mb := Params.Metabase;
    // Get calendar dictionary
    calendarDim := MB.ItemById["DIM_CALENDARR"].Edit() As ICalendarDimension;
    // Get collection of attributes
    userAttrs := CalendarDim.Attributes;
    // Get custom attribute
    userAttr := UserAttrs.Item["ATTR"];
    // Set attribute as alternative hierarchy
    userAttr.HasHierarchy := True;
    // Save changes
    (calendarDim As IMetabaseObject).Save();
End Sub;

See also:

ICalendarDimAttribute