Formula editor  

Introduction

This function is used to aid the user make use of the calculation formulas that use the Adonix expressions language. It can be called by all the fields where a formula can be entered, but only with the client-server interface. The call is made using the right click. The call, essentially accessible from the setup functions is contextual: as a function of the exact context for the setup, the tables, the screens and the dedicated variables can be proposed by default.

Method of operation

The screen that appears is then sub-divided in to several sections organised as shown in the grid below:

Fields and variables

 New table

 New screen

 ……

 Global variables

Operators

 Numeric

 Comparison

 Logic

 

Functions

 Arithmetic

 Strings

 Dates

 Miscellaneous

 

 Entry of the formula

 

Line help

 

Fields and variables section

This section is used to select, by double clicking on it, a variable that will then be inserted in the calculation formula of the previous section. The variables can be defined in the classes and variables corresponding either to the screens or to the tables or to global variables (the fact of double clicking on the line representing the class reveals all the variables existing in the class: it is then possible to enter them by double click).

The classes displayed by default are a function of the call context. In this way, the tables, the screen or other variable classes whose significance is acquired in the context of the call are pre-loaded in the section. The New table and New screen choices are used to add variable classes to the list. The corresponding table or screen is then selected.

Operators section

This section is used to select the different existing operators. These operators are organised in 3 lists (numeric, comparison, logic). Here, a double-click on the list header displays all the possible operators and a double-click on an operator inserts it into the formula currently being entered.

Functions section

This section is used to select the different existing functions. These functions are organised in 3 lists (arithmetic, strings, dates, miscellaneous). Here, a double-click on the list header displays all the possible function along with a short description and a double-click on the function inserts it into the formula currently being entered.

It should be noted that an exhaustive list of the functions is not given in this section. Only the most frequently used functions are found in the list, the others are defined by the general on-line help for the expression language.

On-line help section

This section is only displayed if the tick box has been ticked. It is used to display the on-line help relative to the last function chosen in the Functionssection.

Formula entry section

This is the section in which the formula is entered (by positioning the cursor in the desired place) and/or constructed by the selection of the operators, functions and variables.

The following buttons are available:

  •  is used to verify that the syntax of the formula entered is correct (an OK is then displayed). Where a syntax error is found, the appropriate error message will be displayed.
  •  is used to quit the editor without returning the formula that has been entered.
  •  is used to quit the editor by returning to the entered formula, A check on the syntax will be made when the field that is loaded by the formula editor is validated.

Error messages

All the error messages relative to the formula syntax checks can be displayed.

Tables used

No table is used, but all can be displayed.