WhereKind: RubricatorFormulaDataKind;
WhereKind: Prognoz.Platform.Interop.Cubes.RubricatorFormulaDataKind;
The WhereKind property determines a form of required formula.
Formulas kind is determined by the IRubricatorFormulaData.Kind value.
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(Null) As 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.
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(Null) As 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: