IStdDimOrders.Add

Syntax

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

Parameters

Attribute - dictionary attribute to be added to sorting list.

isReverseOrder - sort order, that is installed by the specified attribute. If the True value is passed, the sorting is determined by decrease. If the False value is passed, the sorting is determined by increase.

Description

The Add method adds the table dictionary to sorting list.

This method returns True if the attribute is added to sorting list, and False if it is not added.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Dimens: IStandardDimension;

DimAttrs: IStandardDimAttributes;

DimOrd: IStdDimOrders;

Begin

MB := MetabaseClass.Active;

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

Dimens := MObj As IStandardDimension;

DimAttrs := Dimens.Attributes;

DimOrd := DimAttrs.Orders;

DimOrd.Add(DimAttrs.Name, False);

MObj.Save;

End Sub Main;

After executing the example the sorting list of table dictionary contains the attribute functioning as Name. Sorting by this attribute is ascending.

See also:

IStdDimOrders