IRdsAttribute.HasHierarchy

Fore Syntax

HasHierarchy: Boolean;

Fore.NET Syntax

HasHierarchy: boolean;

Description

The HasHierarchy property determines whether attribute can be used to built alternative hierarchy.

Comments

Building of alternative hierarchy basing on attributes is available form MDM table dictionaries and composite table MDM dictionaries.

Available values of HasHierarchy:

Fore Example

Executing the example requires that repository contains table MDM dictionary with the TD_MDM identifier.

Add links to the Dal, Metabase and Rds system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    Attrs: IRdsAttributes;
    Attr: IRdsAttribute;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("TD_MDM").Edit;
    Dict := MObj As IRdsDictionary;
    Attrs := Dict.Attributes;
    Attr := Attrs.Add;
    Attr.DataType := DbDataType.String;
    Attr.HasHierarchy := True;
    Attr.Id := "UserAttr";
    Attr.Name := "Attribute for alternative hierarchy";
    Attr.Nullable := True;
    MObj.Save;
End Sub UserProc;

After executing the example the attribute which can be used to built alternative hierarchy will be added to the table MDM dictionary.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Rds;

Public Shared Sub UserProc(Params: StartParams);
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    Attrs: IRdsAttributes;
    Attr: IRdsAttribute;
Begin
    MB := Params.Metabase;
    MObj := MB.ItemById["TD_MDM"].Edit();
    Dict := MObj As IRdsDictionary;
    Attrs := Dict.Attributes;
    Attr := Attrs.Add();
    Attr.DataType := DbDataType.ddtString;
    Attr.HasHierarchy := True;
    Attr.Id := "UserAttr";
    Attr.Name := "Attribute for alternative hierarchy";
    Attr.Nullable := True;
    MObj.Save();
End Sub;

See also:

IRdsAttribute