IRdsParams.Add

Syntax

Add: IRdsParam;

Description

The Add method creates a new parameter of the MDM dictionary.

Example

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

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Dict: IRdsDictionary;

Attrs: IRdsAttributes;

Attr: IRdsAttribute;

Params: IRdsParams;

Param: IRdsParam;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Edit;

Dict := MObj As IRdsDictionary;

Attrs := Dict.Attributes;

Attr := Attrs.Add;

Attr.DataType := DbDataType.Integer;

Attr.Id := "ParamAttr";

Attr.Name := Parameterized attribute;

Params := Dict.Params;

Param := Params.Add;

Param.Attribute := Attr;

Param.Id := "Param1";

Param.Name := Value;

MObj.Save;

End Sub Main;

After executing the example an additional attribute is created in the MDM dictionary. A parameter that controls this attribute is created to control dictionary values.

See also:

IRdsParams