IRubricatorDictionaryLookup.GetFactors

Syntax

GetFactors: Array;

Description

The GetFactors property returns found time series.

Comments

Use the IRubricatorDictionaryLookup.LookupFactors method to get array of keys of the found time series.

Example

Executing the example requires that the repository contains a time series database with the TSDB identifier.

Add links to the Cubes, Metabase, Rds system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    RubDesc: IMetabaseObjectDescriptor;
    Factors: Array;
    RubrIn: IRubricatorInstance;
    FactsLookup: IRubricatorFactsLookup;
    f: IRubricatorFactor;
    Record: IRubricatorRecord;
    a: Array;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    RubDesc := MB.ItemById(
"TSDB");
    RubrIn := RubDesc.Open(
NullAs IRubricatorInstance;
    FactsLookup := RubrIn.CreateFactsLookup;
    FactsLookup.WhereFactorKey := 151515;
    FactsLookup.WhereRevisionKey := -
1;
    FactsLookup.Open(DictionaryCursorOptions.None);
    Factors := FactsLookup.GetFactors;
    
If Factors <> Null Then
        f := Factors[
0];
        Record := f.FactData 
As IRubricatorRecord;
        a := Record.Record.Value 
As Array;
        
If a <> Null Then
            
For i := 0 To a.Length - 1 Do
                Debug.WriteLine(a[i] 
As String);
            
End For;
        
End If;
    
End If;
End Sub UserProc;

Example execution result: the time series with the 151515 key is searched by the last revision. If the time series is found, the console window displays the record containing information about it.

See also:

IRubricatorDictionaryLookup