Calculation User Field
Configure the Calculation User Field
1. Add a calculation user field to your form i.e. one of those listed above in NOTE.
2. Go to the Calculation tab.
3. Select the list control that you wish to run your calculations on.
Remember that a form can have more than one list control. You will need to pick the relevant list control to access the user fields to use them in calculations.
4. Pick the field you wish to run calculations on.
5. Select the criteria applicable to the user field type you have selected.
6. Select the display style you wish to show for the result of this calculation.
The display as options will change based on the user field you've selected for your calculations along with the criteria you are applying for the calculation.
When calculations are set to display as a percentage - it will now display out of 100%
Supported Calculations for Different User Fields
Below is a list of supported user fields and their applicable criteria and display types. Underneath each user field is a table detailing:
- the applicable criteria for each user field type
- the applicable Display As types for each criterion
Number / Currency User Fields
Criteria | Description | Display as |
---|---|---|
Any | Checks all rows with any value (including empty) | Count, Sum, Average |
Not Empty | Checks for rows that are not empty in the list | Count, Percentage, Average, Sum |
Empty | Checks for empty rows in the list | Count, Percentage |
Equals | Checks all rows for a value equal to what is configured | Count, Percentage, Average, Sum |
Not Equals | Checks all rows for a value that is not equal to what is configured | Count, Percentage, Average, Sum |
Greater than | Checks all rows for a value greater than what is configured | Count, Percentage, Average, Sum |
Greater than or Equal to | Checks all rows for a value greater than or equal to what is configured | Count, Percentage, Average, Sum |
Less than | Checks all rows for a value less than what is configured | Count, Percentage, Average, Sum |
Less than or equal to | Checks all rows for a value less than or equal to what is configured | Count, Percentage, Average, Sum |
Select / Radio / Checkbox / Cascading
Criteria | Description | Display as |
---|---|---|
Any | Checks all rows with any value (including empty) | Count |
Not Empty | Checks for rows that are not empty in the list | Count, Percentage |
Empty | Checks for empty rows in the list | Count, Percentage |
Equals | Checks all rows for a value equal to what is configured | Count, Percentage |
Not Equals | Checks all rows for a value that is not equal to what is configured | Count, Percentage |
Contains | Checks all rows that contain the value that is configured | Count, Percentage |
Not Contains | Checks all rows that does not contain the value that is configured | Count, Percentage |
Example
Per Row Calculations for List Tables
You can add a calculation user field to a list table to perform per-row calculations.
One of the key benefits of this feature is the ability to configure simple calculations using multiple fields in the list, with the option to display the results as numbers, currency, or percentages. Whether you need to calculate costs, timelines, or other project metrics, this powerful capability will save you time and effort, while ensuring accuracy and consistency.
Calculation - Non-List User Fields
Support user fields are:
- Number
- Currency
You can use any number or currency user field on a form for calculation configurations.
1. Choose Outside a List in the User Field Location option.
2. Choose your calculation type
- Add
- Subtract
- Multiply
- Divide
3. Select Decimal Places.
4. Select a separator.
5. Select the user fields you want to calculate.
6. Click Save.
Calculation - Re-Calculate Existing Forms
When the configuration of a calculation field is updated, it will automatically update all forms using that calculation field with the new value based on the new configuration.
Calculation Field Visibility
Currently, in order for a field to be considered as part of a calculation all user fields that are part of the calculation must be visible to the logged in user
In addition, the current logged in user must have edit rights for the calculation field.
Unsupported Example
Scenario
Number user field 1
Number user field 2
Both these fields are inside a section on the form that the current logged in user cannot see.
They will not be taken into account when the calculation is executed.
Real-Time Calculations
In the April 2023 release, we released real-time calculations. However, please note that for calculations to occur in real time, all user fields used in the calculation must be visible and editable by the user editing that form at that time.
For fields that are used in the calculation that are visible but not editable, the calculations will only be processed once the form has been submitted.
Calculation of more than One Criteria
RIB CX offers calculation of multiple criteria
Multiple Criteria Support:
Users can add one or more user fields and set multiple criteria within the calculation configuration.
To add more criteria click 'Add Condition'. A new row will form with AND beside it.
Add the next conditions next to the AND row. This will be the second row of criteria for the calculation.
Click Add Condition again to add another row of criterial .
All conditions must be met for the calculation to run.
Aggregate Calculations Only:
Multiple criteria can only be applied to fields inside a list (i.e. Aggregate). Outside list fields and per row calculations are not supported in this configuration.
Calculation Display Options:
Calculations can be displayed as percentages or counts only.
Calculations - based on Date Fields
To enhance form based automation, calculations can also be performed with date fields. This reduces time and effort to calculate the period between two dates as an example.
We support these types of calculations
Calculation | Result Displays as | Explanation | |
---|---|---|---|
1 | Date Field + Number field | Displays as a date | Adds number of days based on the value in the number field to the value in the date field Eg 1-April-24 + 10 = 11-April-24 |
2 | Date Field - Date Field | Displays as a number | Finds the day difference as a number between 2 dates |
3 | Date Field + Select field (based on code) | Displays as a date | Add number of days, months based on the code of the select field. As explained here |
4 | Date Field - Select field (based on code) | Displays as a date | Subtracts number of days, months based on the code of a select field. |
5 | Due date, Issued Date, Modified Date, Date First Closed, Date First Open, Date First Opened + Select field (based on code) | Displays as a date | Same as row 3 Calculations using standard fields do not support setting time values. |
6 | Due date, Issued Date, Modified Date, Date First Closed, Date First Open, Date First Opened - Select field (based on code) | Displays as a date | Same as row 4 Calculations using standard fields do not support setting time values. |
This is where you will find any triggers that are set up for this form type. Click here for information on how to create Document Triggers.
Here is a step by step example on how to configure Date Field + Number Field Calculation
Step 1. Create a Date user field (Date 01) and Number user field (Number 01)
Step 2. Create a Calculation user field (Date 1 + Number)
Step 3. Configure the Calculation user field to say Date 01 + Number 01
Similarly here is an example where Calculation is using date user field + a select user field
Where Date 01 is a date user field and "Due In" is select user field with D and M codes as shown below :
Conditional Formatting for Numeric Calculations
Conditional Formatting for Numeric Calculations is a powerful enhancement that allows users to apply dynamic formatting to calculation fields displaying numerical, currency, or percentage results.
With this feature, users can easily configure conditional formatting by toggling a switch and defining rules based on specific conditions. Whether highlighting values above a certain threshold or emphasising deviations from expected ranges, users have full control over the visual presentation of calculation results
How to do I do it ?
After configuring your calculation field :
Step 1. Enable conditional formatting by toggling the switch and then add your rules for conditional formatting as shown below.
Step 2. Then we drop down menu to define how result should be displayed.
- Results only - will just show the result (e.g. numeric value) without displaying the description / label
- Results and Label - will show the result and description label
Step 3. This is where we define rules of when result should be displayed :
Equals, will display the calculated result when calculated value is equal to the number you define here
Greater than, will display the calculated result when calculated value is greater to the number you define here
Greater than or equal to, will display the calculated result when calculated value is greater than or equal to the number you define here
Less than, will display the calculated result when calculated value is less than to the number you define here
Less than or equal to, will display the calculated result when calculated value is less than or equal to the number you define here
Between, will display the calculated result when calculated value is between to the number you define here
When you have all numeric values linked to colours and labels, it should look something like this :