Formula command (Query Insert menu or Query Field Edit command)

 

Use that command to create or edit a virtual field formula. The command <Query> <Field> <Edit> appears in gray if no virtual field is previously selected.

The Formula editor:

Enter a name in the name box for the virtual field you are creating. That name cannot be empty.

Specify the result field type for that virtual field: choose among Alphanumeric, Numeric, Date, Time and Timestamp. The default type is alphanumeric.

Specify the length for that virtual field. The default value is 20.

Enter a comment for that virtual field. That information is not mandatory.

 

Important: specify if the formula will be run by the Host Database SQL engine (Native Formula) or will be run on the PC side by the ClicknDECiDE Builder SQL engine (Internal Formula). If you select the Internal Formula, the type of the calculated field is set automatically by ClicknDECiDE Builder and appears grayed. If you select the Native formula, you must know and specify yourself the correct field type depending on the formula used (alphanumeric, numeric, date, time or timestamp).

 

image\formula.gif

 

You can enter your formula manually in the edit box or click on the Generate button to create or modify the formula, using the mouse to select field name, functions, parameters or values.

 

Click on <OK> to valid your formula and add (or replace) that virtual field in your query worksheet.