FindSerieByStubKey(StubKey: Integer): ILanerSerie;
StubKey. Data source key.
The FindSerieByStubKey method searches a series in the context by data source key.
If a series is not found, the method returns Null.
Executing the example requires a form with the following components: the Button component named Button1, the LanerBox component named LanerBox1, and the UiErAnalyzer component named UiErAnalyzer1. UiErAnalyzer1 is a data source for LanerBox1. A working area of the time series database should be loaded to UiErAnalyzer1.
There should also be the pContext variable that contains context.
The example is a handler of the OnClick event for the Button1 component.
Add links to the Cubes, Express, ExtCtrls, Forms, Laner, Metabase, and Tab system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
pContext: ILanerContext;
i: Integer;
Ser: ILanerCalculateSerie;
Stub: IVariableStub;
lSerie: ILanerSerie;
Begin
For i := 0 To LanerBox1.SelectedSeriesCount - 1 Do
Ser := LanerBox1.SelectedSeries(i) As ILanerCalculateSerie;
Stub := Ser.Stub;
lSerie := pContext.FindSerieByStubKey(Stub.Key);
If lSerie <> Null Then
Debug.WriteLine(Stub.NameEx(True));
End If;
End For;
End Sub Button1OnClick;
After executing the example, the console window displays extended series names highlighted in the LanerBox1 component and present in the context.
See also: