IRdsDictionaryElementHistory.Count

Syntax

Count: Integer;

Description

The Count property returns number of records in a history of element changes.

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 development environment console for the first root element of the MDM dictionary.

See also:

IRdsDictionaryElementHistory