ICustomDimOrders.Delete

Syntax

Delete(Index: Integer): Boolean;

Parameters

Index. Attribute index is in sorting list.

Description

The Delete method deletes attributes with the specified index and returns attribute whether the deletion was successful.

Comments

The method returns True, if attribute was deleted and False, if deletion is impossible for some reasons.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Cube: IStandardCube;

CustDim: ICustomDimension;

CustAtrs: ICustomDimAttributes;

CustDimOrd: ICustomDimOrders;

s: String;

Begin

MB := MetabaseClass.Active;

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

Cube := MObj As IStandardCube;

CustDim := Cube.FactDimension.Dimension As ICustomDimension;

CustAtrs := CustDim.Attributes;

CustDimOrd := CustAtrs.Orders;

If CustDimOrd.Delete(CustDimOrd.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:

ICustomDimOrders