GetObservationValues(FactData: IRubricatorFactData; CalendarDate: DateTime; [Options: DictionaryGetDataOptions = 0]): IFactorObservationValues;
FactData - data of factors dictionary.
CalendarDate - date, which data must be obtained.
Options - data getting parameter. Optional parameter. Default value - DictionaryGetDataOptions.None - getting data for reading.
The GetObservationValues method returns factor values for specific date.
Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier. A factor with the 1 key must be available in the time series database.
Sub Main;
Var
MB: IMetabase;
RubDesc: IMetabaseObjectDescriptor;
RubrIn: IRubricatorInstance;
FactD: IRubricatorFactData;
FactorObVal: IFactorObservationValues;
Begin
MB := MetabaseClass.Active;
RubDesc := MB.ItemById("OBJ_RUBRICATOR");
RubrIn := RubDesc.Open(Null) As IRubricatorInstance;
FactD := RubrIn.GetFactData(1);
FactorObVal := RubrIn.GetObservationValues(FactD, DateTime.Parse("01.01.2002 00:00:00"));
End Sub Main;
After executing the example the FactorObVal variable stores the object containing data of the factor with the 1 key on January, 1st, 2002.
See also: