IRubricatorFormulasLookup.WhereKind

Fore Syntax

WhereKind: RubricatorFormulaDataKind;

Fore.NET Syntax

WhereKind: Prognoz.Platform.Interop.Cubes.RubricatorFormulaDataKind;

Description

The WhereKind property determines a form of required formula.

Comments

Formulas kind is determined by the IRubricatorFormulaData.Kind value.

Fore Example

Executing the example requires that the repository contains a time series database with the the FC_COMM identifier. Also, add links to the Metabase, Cubes system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Rub: IMetabaseObject;
    RubInst: IRubricatorInstance;
    ForLoo: IRubricatorFormulasLookup;
    formulaData: IRubricatorFormulaData;
Begin
    mb := MetabaseClass.Active;
    Rub := mb.ItemById("FC_COMM").Edit;
    RubInst := Rub.Open(NullAs IRubricatorInstance;
    ForLoo := RubInst.CreateFormulasLookup;
    ForLoo.WhereKind := RubricatorFormulaDataKind.Params;
    formulaData := ForLoo.LookupData;
    If formulaData <> Null
        Then Debug.WriteLine(Formula was not found. Parent key:  + formulaData.ParentKey.ToString);
        Else Debug.WriteLine(Formula was not found);
    End If;
End Sub UserProc;

Executing the example creates an object that searches for formula parameters in the time series database. If parameters are found, key of parent formula is displayed in the console window.

Fore.NET Example

Executing the example requires that the repository contains a time series database with the the FC_COMM identifier.

Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Rds;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    Rub: IMetabaseObject;
    RubInst: IRubricatorInstance;
    ForLoo: IRubricatorFormulasLookup;
    formulaData: IRubricatorFormulaData;
    s: String;
Begin
    mb := Params.Metabase;
    Rub := mb.ItemById["FC_COMM"].Edit();
    RubInst := Rub.Open(NullAs IRubricatorInstance;
    ForLoo := RubInst.CreateFormulasLookup();
    ForLoo.WhereKind := RubricatorFormulaDataKind.rufodakiParams;
    formulaData := ForLoo.LookupData(DictionaryGetDataOptions.dgdoNone);
    If formulaData <> Null
        Then
            s := formulaData.ParentKey.ToString();
        Else
            s := (Formula was not found);
    End If;
End Sub;

Executing the example creates an object that searches for formula parameters in the time series database. If parameters are found, key of the parent formula is saved in the "s" variable.

See also:

IRubricatorFormulasLookup