IRubricatorInstance.LookupFactors

Syntax

LookupFactors(Facts: IRubricatorFactsLookup; Observations: IRubricatorObservationsLookup): Array;

Parameters

Facts. The limits implemented to indicators.

Observations. The limits implemented to indicator data.

Description

The LookupFactors method searches for indicators by conditions specified in input parameters.

Comments

The method returns the array that contains keys of found indicators.

Example

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(NullAs 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:

IRubricatorInstance