IRubricatorFactsLookup.Current

Syntax

Current: IRubricatorFactData;

Description

The Current property returns the current record in array of found indicators.

Comments

Call the IRubricatorFactsLookup.Open method before the current record is obtained, that is, open a cursor that enables the user to navigate through the array of found data.

Example

Executing the example requires that the repository contains a time series database with the FC_COMM identifier. This database should include an indicator attribute with the COUNTRY identifier.

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

Sub UserProc;
Var
    MB: IMetabase;
    RubrInst: IRubricatorInstance;
    FactsLookup: IRubricatorFactsLookup;
    MetaDLookup: IMetaDictionaryLookup;
    Cond: IOrmCondition;
    FactData: IRubricatorFactData;
    i: Integer;
    fdMembers: IMetaDataMembers;
    Value: Variant;
Begin
    MB := MetabaseClass.Active;
    RubrInst := MB.ItemById("FC_COMM").Open(NullAs IRubricatorInstance;
    FactsLookup := RubrInst.CreateFactsLookup;
    MetaDLookup := FactsLookup.Lookup;
    Cond := MetaDLookup.Where.Add;
    Cond.AttributeName := "COUNTRY";
    Cond.Value := 512;
    FactsLookup.Open(DictionaryCursorOptions.None);
    FactData := FactsLookup.Current;
    If FactData <> Null Then
    fdMembers := FactData.Record.Members;
        For i := 0 To fdMembers.Count - 1 Do
            Debug.Write(fdMembers.Item(i).Attribute.Name + ": ");
            Value := fdMembers.Item(i).Value;
            Debug.WriteLine(value);
        End For;
    End If;
    FactsLookup.Close;
End Sub UserProc;

After executing the example search is executed by the following condition: value of the COUNTRY attribute of the indicator is equal to 512. Data of the first found indicator is displayed in the console window.

See also:

IRubricatorFactsLookup