Create a computed field
1
Add a field
Add the field that will hold the result, for example
order_total.2
Make it computed
Choose Computed and build the formula in the expression editor.
3
Pick the result type
number, string, boolean, date, or json.4
Choose null handling and persistence
See the options below.
Operations
- Arithmetic
- Text
- Logic
- Dates
- Aggregation
add, subtract, multiply, divide, modulo, pow, abs, round, round_even, floor, ceilArithmetic uses exact decimals, so money stays accurate.Expression format
Formulas are stored as an expression tree. The dashboard builds it for you; this is what it looks like:Totals from related records
An invoice’spaid_amount can be the sum of its payments’ amount. Each payment links to its invoice with a relation field.
- On Invoices, add a number field
paid_amountand make it computed. - Choose the aggregation Sum, the collection Payments, and the field amount.
- Turn Persisted on, so the total is stored and can be filtered and sorted.
zero, an invoice without payments shows 0.
Options
Bludia tracks dependencies between fields, so changing an input (including a related record) recalculates the values that depend on it.
Computed fields are read-only. Values sent by clients for them are rejected.
