IUserDimOrders.Add

Syntax

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

Parameters

Attribute - dictionary attribute to be added to sorting list.

isReverseOrder - order of sorting by the given attribute.

Description

The Add method adds dictionary attribute to sorting list.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

UsDim: IUserDimension;

UsDimAtr: IUserDimAttributes;

DimOrd: IUserDimOrders;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("USER_DIM").Edit;

UsDim := MObj As IUserDimension;

UsDimAtr := UsDim.Attributes;

DimOrd := UsDimAtr.Orders;

DimOrd.Add(UsDimAtr.Name, False);

MObj.Save;

End Sub Main;

After executing the example the Name attribute is added to the list of dictionary sorting. Sorting by this attribute is ascending.

See also:

IUserDimOrders