Show contents 

Dimensions > Dimensions Assembly Interfaces > IUserDimOrders > IUserDimOrders.Delete

IUserDimOrders.Delete

Syntax

Delete(Index: Integer): Boolean;

Parameters

Index. Attribute index is in sorting list.

Description

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

Example

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    UsDim: IUserDimension;
    UsDimAtr: IUserDimAttributes;
    DimOrd: IUserDimOrders;
    s: String;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("USER_DIM").Edit;
    UsDim := MObj As IUserDimension;
    UsDimAtr := UsDim.Attributes;
    DimOrd := UsDimAtr.Orders;
    If DimOrd.Delete(DimOrd.Count - 1Then
        s := "Yes";
    Else
        s := "No";
    End If;
    MObj.Save;
End Sub UserProc;

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

See also:

IUserDimOrders