Record function applications in Airtable
  • 04 Dec 2023
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Record function applications in Airtable

  • Dark
    Light
  • PDF

Article Summary

Record functions like LAST_MODIFIED_TIME(), CREATED_TIME(), and RECORD_ID offer a lot of unique capabilities in Airtable. This article will show you a few things you can accomplish with these functions that will fit with many different workflows and use cases.

Introduction 

Plan availability

All plan types 

Platform(s)

Web/Browser, Mac app, and Windows app

Related reading

NOTE 

This article is part of a guided course which you can view here.

Sorting by created time

An easy-to-implement use of CREATED_TIME() is to enable sorting your table by the field using that formula. This can help you keep track of the most recent records added to a base, or the opposite: sort by the oldest records.
1500000457601record-applications-1.jpg

Sorting by created time can be especially helpful when a large number of records are being added (either manually, from form submissions, or even programmatically through an API or third-party integration).

Enabling form redirects with record_ID

Within the Airtable form view, if you check the Redirect to URL after the form is submitted toggle, a prompt will appear for you to enter the redirect URL.

1500000457641record-applications-2.png

You can choose to include the ID of the record that will be created by the form in the redirect URL by including the variable {record_id}. You can use this to redirect the submitter of the form to the record that they've just created (assuming that the form submitter has access to the base). If you choose to have a redirect URL, the options to customize the post-submission message, show a "Submit another response button," and show a new blank form will be disabled.

360099325374record-applications-3.gif

Creating automatic record URLs

Another great use of RECORD_ID is to create a custom URL for each record in a table. While you can expand a record to view and copy the full record URL, there may be times when you want to share a larger set of records and their unique IDs. To create this, copy the URL of everything in your address bar when a record is open. It should look like this:

https: //airtable.com /tblN0PWyNFju6fltB/viw6EJcx7sdX8DdRE/recwBQWDQ3wVwEHBg?blocks=hide 

Then, delete everything from rec onward, leaving you with just this:

https:// airtable.com/tblN0PWyNFju6fltB/ viw6EJcx7sdX8DdRE/ 

Now, we'll use that URL string in a formula field along with RECORD_ID() to automatically generate each record URL for a table:

"https://airtable.com/tblN0PWyNFju6fltB/viw6EJcx7sdX8DdRE/" & RECORD_ID() 

Here's the end result:

1500000449202record-applications-4.gif

This can be useful for a number of applications, including the full record URL via API upon record creation.

Using Last_modified_time() for project and task management 

The LAST_MODIFIED_TIME() function works great when you want to timestamp the last change to a record, a field, or multiple fields, but you can do even more with it. What if you also want to conditionally output that timestamp based on a field value? For example, in a project management context, you may only want to see the last time that active projects were last modified.

To do this, you can write a short conditional statement to check for that: IF(Status = "Active", {Status Last Modified}). This formula will only output the last modified time for active projects.

1500000457661record-applications-5.gif

Notice in the GIF above that the last modified time updated only changes made to records with an "active" status. You could easily expand out this functionality to look at multiple statuses, other fields, other conditions, and more.


Was this article helpful?