Lookup field overview
  • 14 Nov 2023
  • 4 Minutos para leer
  • Oscuro
    Ligero
  • PDF

Lookup field overview

  • Oscuro
    Ligero
  • PDF

Article Summary

A lookup field allows you to pull record contents from one linked record into another linked record. As a reminder, linked relationships can be either within the same table or across two separate tables.

You could design a self-linking linked record field in an "Employees" table that could specifically look up an employee's immediate supervisor based upon the dependencies set in the linked record field. Alternatively, if you have an "Orders" table with a field linking to "Clients," you could create a lookup field that displays the linked client's address. In other words, the address from the "Clients" table is brought into the "Orders" table.

Introduction

Plan availability

All plan types

Platform(s)

Web/Browser, Mac app, and Windows app

Try it in Airtable

Add a lookup field

When to use a lookup field

A lookup field is most useful when you want to cross-reference information that's stored in separate tables. As an example, let's say you're using Airtable for project management, with projects stored in one table and tasks related to that project stored in another. Each project is linked to a set of tasks.

4403862702231ScreenShot2021-07-07at35036PM.png

As a project manager, you might want to view information about the tasks associated with each project. A lookup field can be used to select a field in the linked table and display its values. In the example below, the assignees for all tasks in a single project are listed in a lookup field.

4403869523095ScreenShot2021-07-07at35336PM.png

This can be helpful for easily accessing information across tables, setting up automations, formulas, and more. Follow along below for more details on how to use the lookup field.

How to use the lookup field

Add a linked record field

The lookup field requires the use of a linked record to create a link between two tables. In order to use a lookup field, start by configuring a linked record field.

Add a lookup field

Then, add a new field and select the lookup field type.

1500008504161addlookup.gif

Configure the lookup field

If you have multiple linked record fields, you'll have the option to select which of those linked record fields to use for the lookup. Once you've made that selection, pick the cells from those linked records that you want to display.

1500008504141configurelookup.gif

Add lookup conditions

As an optional step, you can select the option to only include linked records from your linked table that meet certain conditions. Using the example above, you may only want to display campaign leads for campaigns that are in a "Planning" or "Live" stage. You can use lookup conditions to specify that criteria, and the field values will only display for records that match the criteria.

1500008504721conditions.gif

Adding multiple lookup fields in bulk

You can easily add multiple lookup fields by right clicking on the name of your linked record field. Then, click the menu option to Add lookup fields.

360081523854ScreenShot2020-07-27at20611PM.jpg

This will bring up another menu where you can select specific fields from the linked table to add as lookup fields.

360081524054Addlookupmenu.jpg

Lookup fields and formula fields

TIP

Under the hood, the information shown in a lookup field is gathered into a list of values, also known as an array of values. In a formula field you cannot access a lookup field's values directly, rather you can access the list of values together, as a unit. Meaning, that if you plan to reference a lookup field within a formula field, you may have to first convert the values into a data type the formula you are working with can accept. We recommend checking out our Array functions when working with a lookup field directly within a formula. Alternatively, we recommend using a Rollup field which can use a formula directly on a linked record's fields.

There are certain situations where you'll want to modify the way information returned from a lookup field appears. A great example of this is a linked record field with multiple records.

If there are multiple linked records, the lookup will concatenate the cell values and separate them with a comma.

360034581233ScreenShot2019-05-07at83400PM.png

While it isn't possible to change the comma separator to another symbol, you can use a rollup field instead of a lookup to do so.
For this approach, add and configure a rollup field similar to the lookup field instructions above. Then, in the rollup aggregation formula, paste the following: SUBSTITUTE(ARRAYJOIN(values), ",", " + "). This instructs the rollup field to substitute the comma separator with something like the + sign instead. You can switch out the + sign in this formula with any symbol you'd like to use as a separator.

1500000452382rollup.png

So, if you find yourself wanting to change the information returned from a lookup field(like you'd do with a formula), we recommend looking into the Rollup field to accomplish your goal.

FAQs

Do lookup fields carry over formatting?

We do not currently support rich text formatting in lookup fields. For more information please see this support article.

How do I format a rollup field's output?

Consult this support article for more information on number-based field formatting.

What fields require linked records to function?

  • A lookup field returns the value(s) for a specific field from a linked record (or records). You can use this to bring information from one table into another table without duplicating it, so that your information will always be up-to-date in all tables.

  • A count field returns the number of linked records in a linked record field.

  • A rollup field is a bit like a lookup, but instead of just returning the value(s) from a field in a linked record, italso performs a calculation on those values—like summing together all the values from the linked records, or returning only the maximum value from the linked records.


¿Te ha sido útil este artículo?