WhereParentKey: Integer;
The WhereParentKey property determines key of the parent formula, by which search is executed.
Key of the parent formula is determined by the IRubricatorFormulaData.ParentKey property.
Executing the example requires that the repository contains a time series database with the FC_COMM identifier.
Add links to the Cubes and Metabase system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
RubInst: IRubricatorInstance;
ForLoo: IRubricatorFormulasLookup;
FormulaData: IRubricatorFormulaData;
Begin
Mb := MetabaseClass.Active;
RubInst := Mb.ItemById("FC_COMM").Open(Null) As IRubricatorInstance;
ForLoo := RubInst.CreateFormulasLookup;
ForLoo.WhereParentKey := 452233;
FormulaData := ForLoo.LookupData;
If FormulaData <> Null Then
Debug.WriteLine("Formula is found. Type: " + FormulaData.Kind.ToString);
Else
Debug.WriteLine("Formula is not found");
End If;
End Sub UserProc;
After executing the example an object is created that searches in the time series database for the formula, which parent formula has the 452233 key. If the formula is found, the value of the found formula type is displayed in the console window.
See also: