Select Page
Formula - On2Air

Formula - On2Air

🔴 On2Air Forms has been shutdown to focus on our On2Air Backups Airtable app Learn more about automated Airtable backups - on2air.com

➡️
With the Formula field in On2Air, form values can be automatically calculated live on your form as the user adds or changes field data. You can also use Formulas to create custom static values, such as URLs, text, numerals, etc.

See more Field Types in the Form Field Reference

image
➡️
The Airtable Formulas and Rollups you currently have in your base won’t update live on a form due to Airtable API limitations. For any value you want auto-calculated live on a form, you’ll need to substitute your Airtable formula with an On2Air Formula to calculate the data. You can still view Formula and Rollup values on your form if you’re editing a record.

In this tutorial

Formula Example

Example: You want to create a form for Job Quotes. You can add each Quote Item to the form and you can the running total of the costs on the form

image

In this example, we used the SUM formula to add all the values from the Fixed Cost field located in the Budget Items table.

SUM({Budget Items::Fixed Cost})
image

Formulas Available

💡
See the formula list - Formulas and CalculationsFormulas and Calculations

How to Add a Field to Your Form

Here’s how to add Airtable Fields or On2Air Custom Fields to your Form

Field Configuration

Field Labels

Title

- Add a title to be displayed above the field as the main name. To leave blank, add a single space

By default, this is the name of your field in Airtable. You can use a different field name than your base and it will not affect the field name in your base.

Sub Title

- Add a subtitle to be displayed above the field. To leave blank, add a single space

You can use text in this field and you can use Markdown to increase text size, bold, or italics

Related: Use Markdown with On2Air FormsUse Markdown with On2Air Forms

Helper Text

- Add helper text to be displayed below the field. To leave blank, add a single space

You can use text in this field and you can use Markdown to increase text size, bold, or italics

Related: Use Markdown with On2Air FormsUse Markdown with On2Air Forms

Example:

image
image

Creating a Formula with On2Air Formulas

  • Add the On2Air Formula to your form
  • Choose your formula - See all Formulas and CalculationsFormulas and Calculations available
  • Next, add your formula name and an open parentheses
  • Click Insert Variable to add an Airtable field to your formula
  • Close the parentheses

Example:

SUM({Budget Items::Fixed Cost})
image
image

Formula Configuration

Formula Output Format

You can choose how you want your formula to display once calculated

Output Format Options

  • Text - Displays as basic text
  • Number - Displays as a number
  • Date/DateTime - Displays as a Date or DateTime
  • Rating - Display as Star Ratings
  • URL - Display as a URL
  • Duration - Display as Duration - 00:00
  • Boolean - Display as True/False
  • Collaborator - Display as Collaborator/User
  • Button - Display as a Button
  • Standard - Display in Standard format

Formula - Button Options

You can insert a custom URL and or label on your Button by using the following syntax

'https://yourwebsite.com | your button label'

Formula

- Create a formula with reference to live form values

See available Formulas and CalculationsFormulas and Calculations

Variables in Formulas

Insert Variables - Click the + icon to add Airtable fields as variables in your formula. Variables are used to insert and use values from your Airtable base.

image
image

The format for variables are:

Field Name

TableName::FieldName

parent.FieldName - (Used in Subforms to reference Parent/Main Form fields)

The fields listed in the Variables dropdown will be any field you have on the form, plus any fields listed in the Display Configuration of your Linked Record fields. This allows you to use fields from other tables.

Fields Listed in Variables

If you need to add additional fields to your Variables from your Linked Record Fields

  • Choose your Linked Record field
  • Open the Display Configuration

image
  • By Display Fields, click Add/Remove Fields
  • Add the fields you want to see in your Variables list

image
  • Click Done
  • Your new fields will be listed in the Variables list
image

Empty Text

- Message to display if the formula value is empty

image

Styling

Template

- Provide a custom template to wrap your formula value in. Use {{VALUE}} as placeholder for the formula value.

Example: If you want to add the $ symbol to your final value, type ${{VALUE}}. Your final value will have a $ in front

image

CSS Class Styling

You can easily customize the look of your formula output with styles.

image
💡
Learn how to style your formula: Style Your Forms and Fields - CSS Class StylingStyle Your Forms and Fields - CSS Class Styling

Airtable Storage

You can store the value created/calculated from the On2Air Formula into an Airtable field in your base.

You can also continue to use formulas created in your Airtable base or use both. Once the record is submitted, your Airtable formulas will still calculate inside of your base, just not on the form.

Store Value to Airtable Field (Optional)- Save the output value of your formula to a field in Airtable

Needs to be a text field and cannot be a field already on your form

Extra Options

Extra Options allow you to use advanced features in your formula

render_as - You can use Markdown in your Formula field - add markdown in the render_as field

sep - add a separator like a comma or other symbol

key_path -

image

Danger Zone

Delete your field from the form

Click Remove

image

Click Yes, I want to delete this field from the form

image