CurrentRevision: IRubricatorRevision;
The CurrentRevision property determines a revision for editing.
Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier. This database must include a factor attribute with the COUNTRIES identifier.
Sub Main;
Var
MB: IMetabase;
RubDesc: IMetabaseObjectDescriptor;
RubrIn: IRubricatorInstance;
FactsLookup: IRubricatorFactsLookup;
MetaDLookup: IMetaDictionaryLookup;
cond: IOrmCondition;
i: Integer;
key: Array Of integer;
Begin
MB := MetabaseClass.Active;
RubDesc := MB.ItemById("OBJ_RUBRICATOR");
RubrIn := RubDesc.Open(Null) As IRubricatorInstance;
FactsLookup := RubrIn.CreateFactsLookup;
MetaDLookup := FactsLookup.Lookup;
cond := MetaDLookup.Where.Add;
cond.AttributeName := "COUNTRIES";
cond.Value := 512;
FactsLookup.CurrentRevision := RubrIn.OpenRevision(New revision);
FactsLookup.CurrentRevision.Save;
i := FactsLookup.LookupFactors.Length;
key := New Integer[i];
key := FactsLookup.LookupFactors;
End Sub Main;
After executing the example the Key array contains keys of factors that correspond to the following condition: value of the COUNTRIES attribute of the factor is 512.
See also: