IDimOrders.Delete

Syntax

Delete(Index: Integer): Boolean;

Parameters

Index - index of attribute included in sorting list.

Description

The Delete method deletes the attribute, index of which is passed by the Index parameter from the list of dictionary sorting, and returns True if the attribute is successfully removed.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

DimModel: IDimensionModel;

DimAttrs: IDimAttributes;

DimOrd: IDimOrders;

s: String;

Begin

MB := MetabaseClass.Active;

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

DimModel := MObj As IDimensionModel;

DimAttrs := DimModel.Attributes;

DimOrd := DimAttrs.Orders;

If DimOrd.Delete(DimOrd.Count - 1) Then

s := "Yes";

Else

s := "No";

End If;

MObj.Save;

End Sub Main;

After executing the example the "s" variable contains Yes, if the last attribute is successfully removed from the list of sorting.

See also:

IDimOrders