IRdsAttributes.Remove

Fore Syntax

Remove(Index: Integer): Boolean;

Fore.NET Syntax

Remove(Index: integer): boolean;

Parameters

Index. Attribute index.

Description

The Remove method removes an attribute, which index is passed by the Index parameter.

Fore Example

Executing the example requires the MDM repository NSI_1 that contains the MDM dictionary with the Dict_1 identifier.

Sub Main;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    Attrs: IRdsAttributes;
Begin
    MB:= MetabaseClass.Active;
    MObj:= MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Edit;
    Dict:= MObj As IRdsDictionary;
    Attrs:= Dict.Attributes;
    Attrs.Remove(0);
    MObj.Save;
End Sub Main;

After executing the example an attribute with the 0 index is removed from the MDM dictionary.

Fore.NET Example

Executing the example requires the MDM repository NSI_1 that contains the MDM dictionary with the Dict_1 identifier.

Imports Prognoz.Platform.Interop.Rds;

...

Public Shared Sub Main(Params : StartParams);
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    Attrs: IRdsAttributes;
Begin
    MB:= Params.Metabase;
    MObj:= MB.ItemByIdNamespace["Dict_1", MB.ItemById["NSI_1"].Key].Edit();
    Dict:= MObj As IRdsDictionary;
    Attrs:= Dict.Attributes;
    Attrs.Remove(0);
    MObj.Save();    
End Sub;

After executing the example an attribute with the 0 index is removed from the MDM dictionary.

See also:

IRdsAttributes