Add(Attribute: ICustomDimAttribute; isReverseOrder: Boolean): Boolean;
Attribute. Dictionary attribute to be added to the sorting list.
isReverseOrder. Sorting order which will be set.
The Add method adds the specified attribute to the sorting list.
Available values for the isReverseOrder parameter:
True. Sort descending;
False. Sort ascending.
Executing the example requires a standard cube with the STD_CUBE identifier in the repository.
Sub UserProc;
Var
MB: IMetabase;
Cube: IStandardCube;
CustDim: ICustomDimension;
CustAtrs: ICustomDimAttributes;
CustDimOrd: ICustomDimOrders;
Begin
MB := MetabaseClass.Active;
Cube := MB.ItemById("STD_CUBE").Edit As IStandardCube;
CustDim := Cube.FactDimension.Dimension As ICustomDimension;
CustAtrs := CustDim.Attributes;
CustDimOrd := CustAtrs.Orders;
CustDimOrd.Add(CustAtrs.Name, False);
(Cube As IMetabaseObject).Save;
End Sub UserProc;
On executing the example the Name attribute is added to the sorting list. Sorting by this attribute is ascending.
See also: