ICustomDimOrders.Add

Syntax

Add(Attribute: ICustomDimAttribute; isReverseOrder: Boolean): Boolean;

Parameters

Attribute. Dictionary attribute to be added to the sorting list.

isReverseOrder. Sorting order which will be set.

Description

The Add method adds the specified attribute to the sorting list.

Comments

Available values for the isReverseOrder parameter:

Example

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:

ICustomDimOrders