Equation Fields in Forms

Form views can display read-only equation fields that calculate values automatically. When you include the source fields used in the calculation, these equations update in real-time as users enter data in your Live App.

In this article you will learn:

  • How equation fields update in real-time within form views
  • Requirements for dynamic equation calculations
  • Limitations of form view equations
  • Best practices for implementing equation fields
  • Solutions for common equation calculation challenges

Real-Time Equation Fields in Form Views

Basic Requirements

To enable dynamic calculations in your forms:

  • Include equation fields as read-only values
  • Add all source fields used in calculations to the form view
  • Configure numeric equations (date equations are not supported)

How Live Calculations Work

When users enter data in form fields, any equations using those values update automatically. This provides immediate feedback and ensures accurate data entry.

Example: Purchase Order Calculator

In a Purchase Orders app, a form might include:

Price Field × Quantity Field = Total (Equation Field)

As users modify either the price or quantity, the total updates instantly, streamlining the order entry process.

How Equation Fields Calculate in Forms

Equation fields in forms behave differently depending on where their source fields come from. Understanding this split will save you a lot of troubleshooting.

Source fields in the same record: live calculation

When all the fields an equation references exist on the same form, the equation updates in real time as users type. No submit needed.

Requirements for live calculation:

  • All source fields must be added to the form (they can be read-only, but they must be present)
  • The equation must be numeric (date equations don't calculate live)
  • The equation can't reference other formula fields (sum, count, average, etc.)
  • The equation can't reference fields from connected records

Source fields from a connected record: calculates after submit

If an equation pulls a value from a connected record in another table, it won't update while the user is filling out the form. The value calculates after the form is submitted and the record is saved.

This is expected behavior, not a bug. The connected record's data isn't part of the current form session — Knack retrieves it from the database after submit.

Date equations

Date equations don't calculate live in forms regardless of where their source fields come from. They always calculate after submit.

Best Practices

For optimal performance:

  • Use simple, direct calculations when possible
  • Avoid complex chains of dependent equations
  • Include clear labels and formatting for equation fields
  • Test calculations thoroughly with various input scenarios

Note: For comprehensive information, review the Form Views and Equations documentation.