HasHierarchy: Boolean;
HasHierarchy: boolean;
The HasHierarchy property determines whether attribute is used as alternative hierarchy.
Available values:
True. Attribute is used as alternative hierarchy;
False. Attribute is not used as alternative hierarchy.
Executing the example requires that the repository contains a table dictionary with the DIM_SEP identifier containing attribute with the NAME identifier.
Add links to the Dimensions, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
standardDim: IStandardDimension;
attrs: IStandardDimAttributes;
attr: IStandardDimAttribute;
Begin
// Get repository
mb := MetabaseClass.Active;
// Get table dictionary
standardDim := MB.ItemById("DIM_SEP").Edit As IStandardDimension;
// Get collection of attributes
attrs := standardDim.Attributes;
// Get the Name attribute
attr := attrs.Item("NAME");
// Set attribute as alternative hierarchy
attr.HasHierarchy := True;
// Save changes
(standardDim As IMetabaseObject).Save;
End Sub UserProc;
After executing the example specified attribute will be used as alternative hierarchy.
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;
standardDim: IStandardDimension;
attrs: IStandardDimAttributes;
attr: IStandardDimAttribute;
Begin
// Get repository
mb := Params.Metabase;
// Get table dictionary
standardDim := MB.ItemById["DIM_SEP"].Edit() As IStandardDimension;
// Get collection of attributes
attrs := standardDim.Attributes;
// Get the Name attribute
attr := attrs.Item["NAME"];
// Set attribute as alternative hierarchy
attr.HasHierarchy := True;
// Save changes
(standardDim As IMetabaseObject).Save();
End Sub;
See also: