Add(Attribute: IDimAttribute; isReverseOrder: Boolean): Boolean;
Attribute - dictionary attribute to be added to sorting list.
isReverseOrder - order of sorting by the given attribute.
The Add method adds dictionary attribute to sorting list.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
DimModel: IDimensionModel;
DimAttrs: IDimAttributes;
DimOrd: IDimOrders;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("D_TO").Edit;
DimModel := MObj As IDimensionModel;
DimAttrs := DimModel.Attributes;
DimOrd := DimAttrs.Orders;
DimOrd.Add(DimAttrs.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: