IRdsDictionaryElements.History

Syntax

History(Element: Integer): IRdsDictionaryElementHistory;

Parameters

Element - element key.

Description

The History property returns history of changes of element values, which key is passed by the Element parameter. It is relevant if change of elements by time is enabled for a dictionary.

Example

Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier. Element changes by time are set for a dictionary.

Sub Main;

Var

MB: IMetabase;

Dict: IRdsDictionary;

DictInst: IRdsDictionaryInstance;

Elements: IRdsDictionaryElements;

Hist: IRdsDictionaryElementHistory;

Attrs: IRdsAttributes;

i, j: Integer;

Begin

MB := MetabaseClass.Active;

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

Attrs := Dict.Attributes;

j := Attrs.Name.Key;

DictInst := Dict.Open(Null);

Elements := DictInst.Elements;

Hist := Elements.History(Elements.Item(1).Key);

For i := 0 To Hist.Count - 1 Do

Debug.WriteLine(Hist.Attribute(i, j));

End For;

End Sub Main;

After executing the example history of changes of the Name attribute is displayed in the console for the first root element of the MDM dictionary.

See also:

IRdsDictionaryElements