Calculations

The calculation element can be used to insert formulas into applications.

Calculations can also be performed using the columns of view tables. Click here for more information.

The "Calculation" application element belongs to the element category "Programming".

The calculation element can be found in the "Elements" section of the "Applications" module. A new element can be created by dragging and dropping it from here and positioning it in the workspace.

More information on creating elements can be found here.

The properties dialog of an element opens automatically when a new element is created. The properties dialog of an existing element can be opened by double-clicking on the element on the workspace, via the context menu "Properties", or via the main menu "Edit / Properties" if it is selected.

"Summary" tab

The title of the calculation, the desired formula, a description and text to be displayed before or after the formula can be set here.

Click here for more information about this dialog.

"Options" tab

Control type

The control type "Floating point number" or "Currency" can be selected here for the display of numerical values.

Format

1000s separator, Decimal separator, Decimal places and Leading zero

Select the format of your choice in each case. If you select the "Portal settings" option, the format will be applied that is defined in the Portal properties.

Re-run calculations on reload action

The calculation is performed again when an element (e.g. a view table), which is located on the current page, is reloaded.

Column presentation in view tables

Click here for more information about this topic.

Example of a calculation on an input page

In a simple application created with the "Basic application" template, the sum of the values from two input fields is calculated. The two input fields "Value 1" and "Value 2" contain floating point numbers.

The calculation element is created on the input page and is given the title "Total".

You can access the formula editor by clicking on "Edit formula". The "Value from control" function from the formula collection was used there in conjunction with addition. Find out here how to easily insert the GUID of the controls and the formula itself into the workspace.