IDimOrders.Item

Syntax

Item(Index: Integer): IDimOrder;

Parameters

Index - index of attribute included in sorting list.

Description

The Item property returns sorting order settings for the attribute included into sorting list. Attribute index is passed by the Index parameter.

Example

Sub Main;

Var

MB: IMetabase;

DimModel: IDimensionModel;

DimAttrs: IDimAttributes;

DimOrd: IDimOrders;

Order: IDimOrder;

s: String;

Begin

MB := MetabaseClass.Active;

DimModel := MB.ItemById("D_TO").Bind As IDimensionModel;

DimAttrs := DimModel.Attributes;

DimOrd := DimAttrs.Orders;

Order := DimOrd.Item(0);

If Order.ReverseOrder Then

s := "Descending";

Else

s := "Ascending";

End If;

End Sub Main;

After executing the example the "s" variable contains Ascending if dictionary elements are sorted in ascending order by the first attribute in the sorting list.

See also:

IDimOrders