IRubricatorInstance.CreateFactsLookup

Syntax

CreateFactsLookup: IRubricatorFactsLookup;

Description

The CreateFactsLookup method creates an object searching for factors.

Example

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;

ObservLookup: IRubricatorObservationsLookup;

Key: Array Of Integer;

i: Integer;

Cond: IOrmCondition;

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;

ObservLookup := RubrIn.CreateObservationsLookup(Null);

ObservLookup.WhereCalendarLevel := DimCalendarLevel.Year;

i := RubrIn.LookupFactors(FactsLookup, ObservLookup).Length;

Key := New Integer[i];

Key := RubrIn.LookupFactors(FactsLookup, ObservLookup);

End Sub Main;

After executing the example the Key array contains factors keys that satisfy the following conditions: annual frequency is present in factor, and the COUNTRIES attribute value equals to 512.

See also:

IRubricatorInstance