IRdsDictionaryInstance.Update

Syntax

Update(Element: Integer; Data: IRdsDictionaryElementData);

Parameters

Element. Key of the updated element.

Data. Data of the element.

Description

The Update method updates data of a specified element.

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;

Dict: IRdsDictionary;

DictInst: IRdsDictionaryInstance;

Data: IRdsDictionaryElementData;

Att: IRDsAttributes;

Key: Integer;

Begin

MB := MetabaseClass.Active;

Dict := MB.ItemByIdNamespace("Dict_1", Mb.ItemById("NSI_1").Key).Bind As IRdsDictionary;

DictInst := Dict.Open(Null);

Key := DictInst.Elements.Item(1).Key;

Data := DictInst.Data(Key);

Att := Dict.Attributes;

Data.Attribute(Att.Name.Key) := "Element";

DictInst.Update(Key, Data);

End Sub Main;

After executing the example the element for which the name has been changed is updated.

See also:

IRdsDictionaryInstance