Skip to main content

Line total with a live formula

Show quantity × unit price instantly while the user fills a form. A form Live formula runs in the browser; use an auto field when the same total must stay correct after imports, API writes, or related-record changes.

When to use this​

  • Order / quote / invoice line forms
  • Any create/update form where two number fields on the same form drive a third

Prefer an auto numeric expression instead when:

Data model​

ObjectKey fields
OrderLinequantity (Number), unit_price (Number), line_total (Number)

unit_price can still be filled from a priced dropdown.

Steps​

  1. Put quantity, unit_price, and line_total on the same Form.
  2. Open settings for line_total.
  3. Set Live formula to:
{quantity}*{unit_price}
  1. Mark line_total read-only if users should not edit the result.
Read-only is display-only

Read-only form fields are not saved to the database. For a value other pages, grids, or a parent sum must read, either:

  • leave the field editable (users can still overwrite; it recalculates when dependencies change), or
  • use an auto field with Set to a numeric expression {quantity} * {unit_price} so the value is stored and kept up to date.

Tips​

  • Only fields on this form can appear in the expression (not the target field itself).
  • Syntax is JavaScript after placeholders are replaced — see Live formula.
  • Combine with a parent sum of prices once line_total is stored (auto field or saved form value).