LookupFactors(Facts: IRubricatorFactsLookup; Observations: IRubricatorObservationsLookup): Array;
Facts. The limits implemented to indicators.
Observations. The limits implemented to indicator data.
The LookupFactors method searches for indicators by conditions specified in input parameters.
The method returns the array that contains keys of found indicators.
Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier. This database must contain an indicator attribute with the COUNTRIES identifier.
Sub UserProc;
Var
MB: IMetabase;
RubrInst: IRubricatorInstance;
FactsLookup: IRubricatorFactsLookup;
MetaDLookup: IMetaDictionaryLookup;
Cond: IOrmCondition;
ObservLookup: IRubricatorObservationsLookup;
Key: Array Of Integer;
Begin
MB := MetabaseClass.Active;
RubrInst := MB.ItemById("OBJ_RUBRICATOR").Open(Null) As IRubricatorInstance;
FactsLookup := RubrInst.CreateFactsLookup;
MetaDLookup := FactsLookup.Lookup;
Cond := MetaDLookup.Where.Add;
Cond.AttributeName := "COUNTRIES";
Cond.Value := 512;
ObservLookup := RubrInst.CreateObservationsLookup(Null);
ObservLookup.WhereCalendarLevel := DimCalendarLevel.Year;
Key := RubrInst.LookupFactors(FactsLookup, ObservLookup);
End Sub UserProc;
After executing the example the Key array contains indicators keys that satisfy the following conditions: annual frequency is present in the indicator, and the COUNTRIES attribute value equals to 512.
See also: