Calculate field value on save

Displaying a preferred unit to end users, but always save a standardised unit

Use this pattern when users enter values in one unit, but the table should always store a standard unit.

Build the form

  1. Add a create form for the table
  2. Add an options picker for the unit field
  3. Use custom options for the supported units

Calculate the value

  1. Add an On change action to the unit picker
  2. Read the previous unit and the new unit
  3. Recalculate the value with Update Field Value

Save the row

  1. Add a save button
  2. Save the form data
  3. Multiply the entered value by the selected unit factor before saving
  4. Clear the form after saving

Why this works

The user sees the unit they selected, but the table always stores one consistent value.

Workspace export

Downloads may take a few seconds.


Did this page help you?