- Getting started with Airtable
- Introduction to Airtable basics
- Contacting Airtable Support Updated
- Airtable home screen
- Glossary of Airtable terminology
- Airtable technical requirements
- Feature differences between Airtable on desktop and mobile
- Airtable keyboard shortcuts
- Using Markdown in Airtable
- Adding descriptions in Airtable
- Finding Airtable IDs
- Airtable Automations
- Automations Overview
- Automation feature walkthroughs
- Integrated automation walkthroughs
- Airtable automation walkthroughs
- Linking existing records using automations
- Conditional groups of automation actions
- Repeating groups of Airtable automation actions
- Creating recurring records using automations
- How to delay Airtable automation runs
- Prevent automations from triggering by mistake
- Use automations to timestamp status updates
- Automation Triggers
- Airtable Triggers
- Airtable automation trigger: When record matches conditions
- Airtable automation trigger: When a form is submitted
- Airtable automation trigger: When record created
- Airtable automation trigger: When record updated
- Airtable automation trigger: When record enters view
- Airtable automation trigger: At scheduled time
- Airtable automation trigger: When webhook received
- Airtable automation trigger: When a button is clicked
- Airtable automation trigger: When email received Updated
- Integrated Triggers
- Airtable Triggers
- Automation Actions
- Airtable Actions
- Airtable automation action: Send email Updated
- Airtable automation action: Create record
- Airtable automation action: Update record
- Airtable automation action: Find records
- Airtable automation action: Sort list
- Airtable automation action: Run a script Updated
- Airtable automation action: Generate with AI
- Integrated Actions
- Airtable automation actions: Slack
- Airtable automation actions: Google Workspace
- Airtable automation action: Send MS Teams message
- Airtable automation actions: Outlook
- Airtable automation actions: Jira Cloud
- Airtable automation actions: Jira Server / Data Center
- Airtable automation actions: Salesforce
- Airtable automation action: Create post in Facebook Pages
- Airtable automation actions: GitHub Issues
- Airtable automation action: Hootsuite post
- Airtable automation action: Send Twilio SMS
- Airtable Actions
- Airtable Bases
- Using Airtable Cobuilder
- Airtable bases overview
- Creating and managing Airtable bases
- Structuring bases in Airtable
- Moving bases between workspaces in Airtable
- Creating and managing tables in Airtable
- Creating Airtable base share links
- Importing third-party data into Airtable
- Using insights in Airtable
- Troubleshooting Airtable base performance
- Airtable Betas
- Collaborating in Airtable
- Airtable Enterprise Support
- General Enterprise information
- External badging in Airtable
- Using app library and components in Airtable Updated
- Ask an Expert beta overview
- European data residency at Airtable
- Airtable user groups overview
- Airtable Enterprise API
- Creating and managing data retention policies in Airtable
- eDiscovery APIs in Airtable
- Airtable and data loss prevention
- Accessing Enterprise audit logs in Airtable
- Set up Jira Server / Data Center to connect with Airtable
- Admin panel pages
- Airtable admin panel overview
- Users - Airtable enterprise admin panel
- Airtable admin panel user details
- Groups - Airtable admin panel
- Workspaces - Airtable Enterprise Admin Panel
- Bases - Airtable admin panel
- Interfaces - Airtable admin panel
- Data sets - Airtable admin panel
- Managed apps - Airtable admin panel
- Components - Airtable admin panel
- Reports - Airtable admin panel
- Settings - Airtable admin panel Updated
- Managing Enterprise organizations
- Managing Enterprise admins in admin panel
- Using Organizations
- Organization branding for apps in Airtable
- Enterprise Hub in Airtable
- Enterprise Hub: Org unit assignment with user groups Updated
- Deactivating, removing access, and reactivating users in the admin panel
- Managing user access to workspaces and bases
- Airtable Enterprise Key Management Updated
- Custom terms of use New
- Enterprise SSO
- General Enterprise information
- Airtable Extensions
- Airtable Fields
- Fields Overview
- Attachment
- Date-based fields
- Formula
- Getting Started with Formulas
- Formula Foundations
- The essentials of Airtable formulas
- Formula writing tips for beginners
- Troubleshooting formulas
- Basic calculations
- Conditional statements
- Logical arguments
- Working with dates
- Displaying DATETIME_FORMAT using the date field in Airtable
- Working with date functions in Airtable
- Calculating the difference between dates in Airtable
- Supported DATETIME_DIFF unit specifiers in Airtable
- Supported DATETIME_FORMAT format specifiers in Airtable
- Using the DATETIME_PARSE() formula in Airtable
- Working with timezones
- Record functions
- Text functions
- Numeric functions
- Common Solutions: Beginner
- Common Solutions: Intermediate
- Common Solutions: Advanced
- Long Text Field
- Linked Record Field
- Linking records in Airtable
- Limiting linked record selection to a view in Airtable
- Dynamic filtering in linked record fields
- Linking to one, many, or a subset of Airtable records
- Converting existing fields to Airtable linked records
- Reordering record links in Airtable
- Understanding linked record relationships in Airtable
- Number-Based Fields
- Other Fields
- Rollup, lookup, and count fields
- Select and user fields
- Integrating with Airtable
- API
- Getting started with Airtable's Web API
- Creating personal access tokens
- Airtable Webhooks API Overview
- Service accounts overview
- Airtable Web API - Using filterByFormula or sort parameters
- Airtable API Deprecation Guidelines
- Airtable API: Common troubleshooting
- Managing API call limits in Airtable
- URL length limitations for web API requests
- Integration services
- Third-party integrations via OAuth overview
- Troubleshooting disconnected OAuth integrations in Airtable
- Options for integrating with Airtable
- Third-party integrations - Common troubleshooting
- Low-code integrations - Common troubleshooting
- Integrating Airtable with external calendar applications
- Visualizing records from Airtable in Tableau
- Visualizing Airtable records in Microsoft Power BI & Power Query
- Integrating HubSpot with Airtable
- Using Zapier to integrate Airtable with other services
- Using Zapier's Multi-Step Zaps to find and update records
- Using IFTTT to integrate Airtable with other services
- Integrating with AWS Lambda & DynamoDB
- Developer tools
- API
- Airtable Interface Designer
- Interface Designer overview articles
- Interface layouts
- Interface elements
- Adding and removing elements in interfaces
- Adding layouts to interfaces
- Formatting elements in interfaces
- Interface element: Button
- Interface element: Calendar
- Interface element: Chart
- Interface element: Filter
- Interface element: Gallery
- Interface element: Grid
- Interface element: Kanban
- Interface element: Number
- Interface element: Record picker
- Interface element: Text
- Interface element: Timeline
- Learning and Resources
- Managing Airtable
- Airtable Policy
- Airtable Records
- Airtable Sync
- Airtable Views
- Airtable Workspaces
- Print
- Share
- DarkLight
- PDF
Formula writing tips for beginners
- Updated on 24 Oct 2024
- 4 Minutes to read
- Print
- Share
- DarkLight
- PDF
This article covers tips to help you learn how to use Airtable formulas to streamline your team's and organization's work.
Introduction
All plan types | |
Platform(s) | Web/Browser, Mac app, and Windows app |
Related reading |
Using curly brackets to reference field names
Using curly brackets
When referencing a field, it's a best practice to surround the field name with curly brackets (e.g. {Due Date} ). However, there are a few aspects of referencing fields that you'll need to know when writing Airtable formulas.
For fields with only a single word or character (e.g. no spaces in the field name), you don't have to add curly brackets around the field name. See the animation below showing a reference to the date field without brackets.
IF(NOW() > Date, "Overdue", " There's still time!")
If you have an existing formula (like the one used above), and then change a field name, Airtable will automatically update your formula to reflect the new field name. In the example below, after changing the Date field to be named Due Date, the formula field both updates the name and adds curly brackets around {Due Date}.
IF(NOW() > {Due Date}, "Overdue", " There's still time!")
For this new field name, curly brackets are required for use in any formula because it has a space in the name. If you try to reference a field name without using curly brackets, you'll see this error appear in your formula field.
Parenthesis placement in Airtable formulas
Parenthesis placement
Parenthesis are used in Airtable to separate out statements and conditions (e.g. (5+5) * 10 ), as well as containers for formula function (e.g. CONCATENATE({Field 1}, {Field 2})
). No matter how you use parenthesis, there must always be an opening and closing parenthesis.
It's important when writing a formula that wherever parenthesis are used, they're placed in the right spot. With simple formulas, using a growth rate calculation below as an example, it's apparent where the parenthesis need to be placed:
({Present} - {Past}) / {Past}
As you build more complex formulas - especially with various functions and nested statements - take extra care that all of the parenthesis both open and close whatever function or statement they're supposed to contain.
Building complex formulas in Airtable
Building complex formulas
Whether you're just starting out with Airtable formulas, or you're writing out a 60 line nested IF statement, being able to understand the logic and flow of formulas can be challenging! A helpful practice to keep yourself in check when building a formula is to first write out what you want to accomplish in plain language.
Using an IF statement as an example, you may want to accomplish the following: "If the deadline is within 30 days from now, and the status is not started, then show an alert, otherwise show nothing." Write this out, and then split out the various aspects of that sentence into it's related formula components.
The entire formula needs to be structured using an IF()
function, even though it will have other functions within it. You'll first need to know the technical format (see our formula field reference), and then you can:
The second component needs the AND()
function; the alert should only be if the deadline is within 30 days from now AND the status is not started.
Now that both components are written, combine the technical formats together.
Lastly, now that all of the placeholder functions are there, substitute them with the actual formulas written before.
Building readable formulas in Airtable
Building readable formulas
When writing complex formulas, it's vital to be able to see how each of the various functions you may use relate to one another (this is especially helpful when revising a formula that you may have wrote weeks or months before).
As an example, let's say you're a content writer for a website, and are drafting that content in Airtable. You need to easily add in the stock ticker for a specific list of companies whenever their name is referenced in an article. You can start with a simple formula that'd be easy to write out on a line or two.
SUBSTITUTE({Article content},"Apple","Apple (NASDAQ:AAPL)")
While this is easy to write and visually see on a line, if you decide to add in more companies and stock tickers, writing a formula with several functions all in a line can be difficult.
SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE({Article content},"Apple","Apple (NASDAQ:AAPL)"),"Alphabet","Alphabet (NASDAQ:GOOG)"),"Microsoft","Microsoft (NASDAQ:MSFT)"),"Amazon","Amazon (NASDAQ:AMZN)"),"Facebook","Facebook (NASDAQ:FB)")
While that formula will work perfectly, it's much easier to write it out like this instead:
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
{Article content},
"Apple","Apple (NASDAQ:AAPL)"),
"Alphabet","Alphabet (NASDAQ:GOOG)"),
"Microsoft","Microsoft (NASDAQ:MSFT)"),
"Amazon","Amazon (NASDAQ:AMZN)"),
"Facebook","Facebook (NASDAQ:FB)")
Notice that different functions are nested, or indented, under one another for readability. Structuring a formula this way gives a clear picture of the various functions used and how they relate to one another.
Building formulas alongside your base
Building formulas
When you're building longer and more complex formulas, it's often helpful to see your formula alongside of your base as you build out the different components. To help with this, you can use a Description extension, or even a free text editor program in a separate window next to your base.
Using the same formula above as an example, you can see how the process of writing the formula alongside of your base can be helpful as you reference field names and add in nested arguments.
Using a larger text editor like this can be helpful as you can add line breaks and tabs to your formula (which cannot be input at this time directly within a formula field).