IRubricatorFormulasLookup.WhereXML

Syntax

WhereXML: String;

Description

The WhereXML property determines XML code of required formula.

Example

Executing the example requires a form, a button named Button1 and the Memo component named Memo1. Memo1 should contain a formula of XML code type. The repository must contain a time series database with the OBJ_RUBRICATOR identifier that contains a formulas dictionary.

Click the button to execute the example.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Mb: IMetabase;
    RubInst: IRubricatorInstance;
    ForLoo: IRubricatorFormulasLookup;
    FormulaData: IRubricatorFormulaData;
Begin
    Mb := MetabaseClass.Active;
    RubInst := Mb.ItemById("OBJ_RUBRICATOR").Open(NullAs IRubricatorInstance;
    ForLoo := RubInst.CreateFormulasLookup;
    ForLoo.WhereXML := Memo1.Text;
    FormulaData := ForLoo.LookupData;
    Memo1.Clear;
    If FormulaData <> Null Then
        Memo1.Text := "Formula is found. Formula key: " + FormulaData.FormulaKey.ToString;
    Else
        Memo1.Text := "Formula is not found";
    End If;
End Sub Button1OnClick;

After executing the example a new object is created that searches for formula in the time series database by specified XML code. If the formula is found, its key is displayed in Memo1.

See also:

IRubricatorFormulasLookup