RevisionAttributes(Index: Integer): String;
Index - index of an attribute name in the collection.
The RevisionAttributes property determines a collection of attributes names.
This property is used with the WhereRevisionBetween or WhereRevisionKey properties.
Executing the example requires that the repository contains a time series database with the OBJ_FC identifier.This database must have time series attributes with the COUNTRY, UNIT and REV identifiers.
Sub Main;
Var
MB: IMetabase;
RubDesc: IMetabaseObjectDescriptor;
RubrIn: IRubricatorInstance;
DictInst: IMetaDictionaryInstance;
MetaDLookup: IMetaDictionaryLookup;
Conditions: IOrmConditions;
Cond: IOrmCondition;
i: Integer;
Res: Array Of Integer;
Begin
MB := MetabaseClass.Active;
RubDesc := MB.ItemById("OBJ_FC");
RubrIn := RubDesc.Open(Null) As IRubricatorInstance;
DictInst := RubrIn.Facts;
MetaDLookup := DictInst.CreateLookup("");
Conditions := MetaDLookup.Where;
Cond := Conditions.Add;
Cond.AttributeName := "COUNTRY";
Cond.Value := 512;
MetaDLookup.RevisionAttributes(0) := "REV";
MetaDLookup.RevisionAttributes(1) := "UNIT";
MetaDLookup.WhereRevisionBetween(60, 66);
i := MetaDLookup.LookupKeys("FACTOR").Length;
Res := New Integer[i];
Res := MetaDLookup.LookupKeys("FACTOR");
For i := 0 To Res.Length - 1 Do
Debug.WriteLine(Res[i].ToString);
End For;
End Sub Main;
After executing the example, the console window displays time series keys that meet the following conditions: the COUNTRIES time series attribute value equals to 512, and the UNIT and REV attributes values lie within the range from 60 to 66.
See also: