IRdsDictionaryElementHistory.Attribute

Syntax

Attribute(Index: Integer; AttributeKey: Integer): Variant;

Parameters

Index. Record index in an element history.

AttributeKey. Attribute key, which value is necessary to receive.

Description

The Attribute property returns a value of the AttributeKey attribute for a record in a history, which index is passed by the Index parameter.

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