Form Builder

Calculated fields

A Number field can calculate its own value from other fields instead of being typed in. Select the number field, open the Rules tab, and turn on "Calculate this field." The field then shows its result and is read-only on the form. There are two ways to define the calculation: a visual builder or a typed formula.

Itemized pricing (pick items and quantities off a menu or price list) doesn't need a calculation at all — use a Priced items field bound to a rate sheet instead.

Visual builder

Choose an operation, then add the values it works on (its operands), in order. The operations are:

Add +Subtract −Multiply ×Divide ÷Average avgMinimum minMaximum max

Each operand can be:

  • A field — another number field on the form (added from the "Add a field…" menu). A People field counts the people listed, so "meals per person × People attending" needs no separate head-count box.
  • A number — a fixed constant (the "+ Number" button).
  • An option value — the number assigned to whatever option a dropdown is set to (the "+ Option value" button, shown as "Value of {dropdown}"). See option values.
  • A rate — an item's unit price from one of your district's rate sheets, the price lists admins maintain under Admin > Rate sheets (the "+ Rate" button): mileage × the district mileage rate, per-diem × days. The rate is snapshotted when the request is submitted, so later rate changes never alter it.

Order matters for Subtract and Divide (they work left to right). Instead of picking fields from a menu, you can click "Link fields on the form" and then click number fields directly on the canvas.

Formula mode

Switch the builder from Visual to Formula to type an expression instead, e.g.:

quantity * unit_price + shipping

Use + − * / and parentheses. Reference other fields by their field key (the lowercase identifier in the field's settings), and rate-sheet prices as rate('Travel Rates', 'Mileage'); the builder shows quick-insert buttons for the available fields and tells you live whether the formula is valid.

Good to know

  • The field recalculates instantly as the referenced values change.
  • If an input is blank or not a number — or a division by zero would result — the field stays blank rather than showing an error.
  • A calculation can build on other calculated fields; chains resolve automatically.
  • A field hidden by a visibility rule (its own, or its section's) counts as zero, so a switched-off expense drops out of the total. Results are recalculated when the request is saved.
  • Referencing a Priced items field (in either mode) uses its subtotal — handy for rolling itemized costs into a grand total.
  • Set the field's number format to display the result as currency, a percentage, or with fixed decimals.