Process Hub · Fields, validation and calculations
Configure calculations and line totals
Build formulas with stable field keys, test totals and understand lookup/error behaviour.
On this page
Before you start
- Use numeric source fields with stable keys. For a Header Line example, prepare quantity, unit_cost and a calculated line_total. Prepare a deployed lookup if using LOOKUP.
Formula reference
Expressions use the supported formula language. JavaScript and SQL are not accepted.
On smaller screens, scroll the table sideways to see all columns.
| Setting | How to use it |
|---|---|
| Arithmetic and totals | SUM, COUNT, MIN, MAX, ABS, ROUND, SUMIF, COUNTIF |
| Decisions and blanks | IF, IFERROR, AND, OR, COALESCE |
| Text and lists | CONCAT, TRIM, CONTAINS, CHARACTERS, SPLIT, LIST |
| Lookup | LOOKUP against configured lookup sources |
Follow these steps
Screenshots use fictional training data. Names, dates and amounts are examples. Select an image to view it at full size.
- Add or select the Calculation field in Builder. Choose the numeric/text output and precision appropriate for the business value.
- Enter a supported expression using stable keys in square brackets. For one line use ROUND([quantity] * [unit_cost], 2). Reference header/line contexts explicitly when needed.
- For the header total use SUM([Lines.line_total]) with the actual repeated entity and field keys. Select the appropriate entity context rather than typing a display label.
![Formula editor containing ROUND([quantity] * [unit_cost], 2) and Test formula.](../assets/screenshots/studio/builder-calculations.jpg?v=7bdc57680471)
This line calculation multiplies quantity by unit cost. Use Test formula and verify the result type before release. - Preview known values, blanks and invalid inputs. Use two lines: quantity 10 at 25 and quantity 4 at 60. The expected totals are 250, 240 and 490.
- When using LOOKUP, choose a configured Process Hub lookup and exact column names. Decide whether no match shows an error, returns blank or uses the supported fallback. Test no match and duplicate keys separately.
- Save, publish and deploy. Create a training record, change a source value and submit. Verify the server-computed result and any approved manual-override behaviour.
Worked totals
On smaller screens, scroll the table sideways to see all columns.
| Test input | Expected value |
|---|---|
| 10 × 25 | 250 |
| 4 × 60 | 240 |
| Sum of line totals | 490 |
Line total: ROUND([quantity] * [unit_cost], 2)
Header total: SUM([Lines.line_total])What you should see
Calculated values match known examples and update from their inputs, with understandable handling of missing or invalid data.
If something goes wrong
A formula works for one line but the header total is wrong
Check entity context and use the repeated collection reference, such as [Lines.line_total]. Confirm every line uses numeric inputs.
A fallback hides a configuration problem
IFERROR is bounded error handling. It does not make invalid formulas, missing fields, permission failures or unavailable sources valid. Repair the underlying configuration.
A manually overridden number stops recalculating
An enabled numeric manual override preserves its value across input changes. The runtime has no general Reset button; design and document the intended correction route.