How to Automatically Link a Formula Value to an Airtable Record

A formula can build the name of a product, customer, or project, but it cannot create the linked record relationship by itself. To show how the process works, we will use an order that combines Size and Color into Large | Blue, then links itself to the matching product in a Products table.

Airtable automation matching a formula value to a linked product record

Set up the tables

In the Orders table, add:

  • Size, such as Large or Small
  • Color, such as Blue or Red
  • Product Name, a formula field
  • Product, a linked record field pointing to the Products table

Use this formula in Product Name:

{Size} & " | " & {Color}

When Size is Large and Color is Blue, the formula returns Large | Blue.

In the Products table, use an editable primary field such as Name. The value in this field must match the formula output exactly. For this example, the Products table could contain records named Large | Blue, Large | Red, and Small | Blue.

Keep those names unique. If two product records have the same name, the automation cannot reliably choose the right one.

Find the matching record

Create an automation with the When record matches conditions trigger.

Set the conditions in the Orders table to:

  • Product Name is not empty
  • Product is empty

This waits until the formula has a value and skips orders that are already linked.

Add a Find records action for the Products table. Set its condition so the Products Name matches the triggering order's Product Name value.

Then add an Update record action for the triggering Order. In the Product linked record field, use the record ID returned by Find records.

Using the record ID links the exact Product record that Airtable found. It is more reliable than passing the product name directly, especially when you later change the primary field or use a formula as the primary field.

Test the automation with an order whose formula returns an existing product name. The Product linked field should then show that product record.

Create missing products only when you need to

If every possible product should already exist, stop the automation when Find records returns no match. This prevents a spelling mistake in Size or Color from creating a new product.

If new combinations should create products automatically, add a conditional group after Find records:

  1. When a matching Product is found, update the Order with the found Product record ID.
  2. When no Product is found, add a Create record action for the Products table and set Name to the Product Name formula value.
  3. Add another Update record action and link the Order to the record ID returned by Create record.

The Products primary field must be editable for this second path. Airtable cannot create a new linked record by writing into a formula primary field.

Make the match exact

The formula output and the Products primary field must match exactly, including spaces, capitalization, and punctuation. Large | Blue and Large|Blue are different values.

If Size or Color can change after the Order is linked, the Product field will not be empty anymore, so the conditions above will skip that record. Add a checkbox such as Relink product and include it in the trigger when people need to change the source values later. Clear the checkbox after the automation updates the link.

For an existing batch of records, you can also copy the formula results into a text field and convert that field to a linked record field. Airtable will match the values against the linked table's primary field, so clean up spacing and duplicate names first.

For more help with matching form submissions to existing or new linked records, see how to automatically link Airtable form submissions to existing or new records.