IRubricatorInstanceList.FindByKey

Syntax

FindByKey(RubricatorKey: Integer): IRubricatorInstance;

Description

The FindByKey method returns database from the collection by its key.

Comments

The method returns Null if time series database with the specified key is missing in the collection.

Example

Executing the example requires a form, the LanerBox component on it and the UiErAnalyzer component with the UiErAnalyzer1 identifier that is a data source for LanerBox. A workbook of the time series database in series mode must be loaded to UiErAnalyzer1.

Add links to the Cubes and the Metabase system assemblies.

Sub FindRub;
Var
    Laner: ILaner;
    RubList: IRubricatorInstanceList;
    mb: IMetabase;
    key: Integer;
    RubrInst: IRubricatorInstance;
Begin
    Laner := UiErAnalyzer1.ErAnalyzer.Laner;
    RubList := Laner.UsedRubricators;
    mb := MetabaseClass.Active;
    key := mb.GetObjectKeyById("FC_COMM");
    RubrInst := RubList.FindByKey(key);
    If RubrInst <> Null Then
            Debug.WriteLine("Is data source");
        Else
            Debug.WriteLine(Is not the data source);
    End If;
End Sub FindRub;

After executing the example it is determined whether the time series database with the FC_COMM identifier is a data source for the series of loaded workbook. The result is displayed in the console window.

See also:

IRubricatorInstanceList