Calculation

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

Calculations can also be performed with the columns of view tables. All information can be found here.

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

The calculation element can be found in the "Applications" module in the "Elements" area. A new element can be created by positioning it on the workspace from here using drag & drop.

Further 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.

General" tab

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

Further information on this dialog can be found here.

Options" tab

Control type

The control type "Floating point number" or "Currency" can be selected here for the display of the 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 setting" entry, the format is converted according to the setting 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

All information on this topic can be found here.

Example 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. You can find out here how you can easily insert the GUID of the controls and the formula itself into the workspace.