Current: IRubricatorFactData;
The property is read-only.
The Current property returns the current record in array of found factors.
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.
Executing the example requires that the repository contains a time series database with the FC_COMM identifier. This database must include attribute of the factor with the COUNTRY identifier. Add links to the Metabase, Cubes, Rds, Orm system assemblies.
Sub UserProc;
Var
MB: IMetabase;
RubDesc: IMetabaseObjectDescriptor;
RubrIn: IRubricatorInstance;
FactsLookup: IRubricatorFactsLookup;
MetaDLookup: IMetaDictionaryLookup;
cond: IOrmCondition;
FactData: IRubricatorFactData;
i: Integer;
fdMembers: IMetaDataMembers;
Value: Variant;
Begin
MB := MetabaseClass.Active;
RubDesc := MB.ItemById("FC_COMM");
RubrIn := RubDesc.Open(Null) As IRubricatorInstance;
FactsLookup := RubrIn.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 last condition: value of the COUNTRY attribute of the factor is equal to 512. Data of the first found factor is displayed in the console window.
See also: