Joget Workflow v6 RC2 Released
Check out the latest Joget Workflow v6 RC2 for many new features and improvements in user experience (UX), app maintainability and performance.
Calculation Field allows you to perform a series of arithmetic computations to a set or a series of fields.
Figure 1: Screenshot highlighting Calculation Field taken from sample HR Expenses Claim app
Screenshots taken from http://localhost:8080/jw/web/console/app/hr_expense/1/form/builder/hr_expense_claim
Figure 2: Calculation Field Properties
|ID||Element ID (By declaring as "total", a corresponding database table column "c_total" will be created)|
|Label||Element Label to be displayed to end user.|
|Equation||Arithmetic operation using the variables declared above.|
Figure 3: Calculation Field Properties - Advanced Options
Attach a Validator plugin to validate the input value.
When will validation takes place?
Validation will takes place whenever form is submitted except when it is submitted as "Save as Draft".
|Number of Decimal||Number of Decimal|
|Prefix||Prefix of the calculated value|
|Postfix||Postix of the calculated value|
|Use Thousand Separator?||Thousand Separator toggle.|
|Hidden?||Shows this element to the end user.|
|Display as Label?||Displays the value of the element as plain text.|
If the form is part of a workflow process, upon saving of the form (by clicking on "Save as Draft" or "Complete" button). The value in this input field will be saved into the corresponding workflow variable named here.
Using a non-existent Workflow Variable name
You will get the following warning with the name printed out (e.g. status) in the server log if you attempt to map to a non-existent Workflow Variable.