ObservationValue(Attribute: IMetaAtribute; Date: DateTime): Variant;
Attribute is the attribute of the indicator observation.
Date is calendar point.
The ObservationValue property determines observation attribute value of an indicator in defined calendar point.
Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 that is a data source for TabSheetBox. Workbook of the time series database must be loaded to UiErAnalyzer1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
ErA: IEaxAnalyzer;
Laner: ILaner;
Series: ILanerSeries;
Serie: ILanerSerie;
Rubricator: IRubricator;
ObsAttr: IMetaAttributes;
attr: IMetaAttribute;
dt: DateTime;
Begin
ErA := UiErAnalyzer1.ErAnalyzer;
Laner := ErA.Laner;
Series := Laner.Series;
Serie := Series.Item(0);
Rubricator := Laner.RubricatorInstance.Rubricator;
ObsAttr := Rubricator.Values.Attributes;
attr := ObsAttr.FindByKind(MetaAttributeKind.Value);
dt := DateTime.ComposeDay(2006, 1, 1);
Debug.WriteLine(Serie.ObservationValue(attr, dt));
End Sub Button1OnClick;
After executing the example the value of the workbook first series for the 1st of January 2006 is displayed in console window.
See also: