Item(Index: Integer): IStdDimOrder;
Index - index of attribute included in sorting list.
The Item property returns sorting order settings for the attribute included into sorting list of a table dictionary. Attribute index is passed by the Index parameter.
Sub Main;
Var
MB: IMetabase;
Dimens: IStandardDimension;
DimAttrs: IStandardDimAttributes;
DimOrd: IStdDimOrders;
Order: IStdDimOrder;
s: String;
Begin
MB := MetabaseClass.Active;
Dimens := MB.ItemById("TAB_DIM").Bind As IStandardDimension;
DimAttrs := Dimens.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: