Dropdown of options with prices
Let users pick a product (or service, fee, room…) from a dropdown, and automatically fill the price from a linked catalogue. Combine a Reference field with an auto field that copies the price.
When to use this
- Order line: choose product → unit price fills in
- Registration: choose ticket type → fee fills in
- Quote line: choose catalogue item → list price fills in
A plain Choice field is enough when options never change and have no extra data. Use a linked table when prices, SKUs, or availability live as real records you maintain over time.
Data model
| Object | Key fields |
|---|---|
| Product | name (Text), sku (Text, optional), price (Number), label (Text, optional auto — for richer dropdown text) |
| OrderLine | order (Reference → Order), product (Reference → Product), unit_price (Number, auto), quantity (Number) |
Keep the catalogue on Product. The line only stores the chosen product and a snapshot of the price at selection time (unit_price), so later catalogue price changes do not rewrite historical orders unless you want that.
Steps
1. Catalogue object
Create Product with at least name and price. Add sample rows in the Builder or via import.
Optional: an auto text field label with Set to a text expression, for example:
{name} — {price}
Set the Reference’s Display field to label (or name) so the dropdown shows what operators expect — see Field types.
2. Reference on the line
On OrderLine, add product as a Reference to Product. On forms this becomes a searchable dropdown of products.
3. Copy the price with an auto field
On OrderLine, create (or configure) Number field unit_price:
- Open Automatic Value and enable it.
- Choose Set to a field value.
- Pick the connected field:
product→price.
Whenever the user selects (or changes) the product, unit_price updates from the catalogue.
4. Line total and order total
- Line amount: live formula or auto expression
{quantity} * {unit_price}— see also Sum of prices. - Order total: auto sum of line amounts on the parent Order.
Tips
- Snapshot vs live price: copying into
unit_pricefreezes the amount on the line. If you always want the current catalogue price, display{product.price}in detail views and skip storingunit_price— but totals and documents usually need the snapshot. - Allow a manual override by leaving
unit_priceeditable and only using the auto rule as a default when empty, or add a conditional rule so the copy runs only whenunit_priceis blank (depending on how you configure the rules). - Sort the dropdown with the Reference Sort by option (e.g. by
name). - Hide discontinued products with form display rules or by filtering the reference candidates when your app supports that in the field settings.
Related
- Sum prices of related records
- Line total with a live formula
- Auto fields
- Data modeling — when to use a join object vs Reference Array
- Customer portal tutorial