Working with the Lookup field

The Lookup field automatically pulls and displays specific information from a linked record, allowing you to see data from another table in one place.

This guide covers what a Lookup field is and its “read-only” nature, the prerequisite for creating a Lookup field, how to create a Lookup field, and how to sort and filter by a Lookup field.

What is a Lookup field?

A Lookup field works after you have already set up a Link-to-table field. While the link field connects the records, the Lookup field pulls in and displays specific data from those linked records.

A key feature of Lookup fields is that they are read-only. You cannot edit the data in a Lookup field directly. To change the value, you must go to the original record (e.g., by clicking the link in the Link-to-table field) and edit the data in its source cell.

Learn more about description, filtering and sorting by a Lookup field: Configure field types

How to create a Lookup field

Prerequisite

You must have an existing Link-to-table field in your table before you can create a Lookup field.

Steps

  1. In your table, click the plus sign + to add a new field.
  2. Select Lookup from the field type dropdown menu.
  3. In the configuration box, you must select two things:
    • Select a link row field: Choose the Link-to-table field you want to use for the lookup.
    • Select a field to lookup: Choose the specific field from the other table that you want to display.
  4. Click Create. Creating a Lookup field in Baserow

The new read-only field will now be populated with the data from the linked records.

Example: Customers and Orders

This field is the perfect way to avoid re-typing data and reduce errors. Imagine you have two tables:

  1. Customers: Contains Customer Name, Email, and Address.
  2. Orders: Contains Order ID, Order Date, and a Link-to-table field called [Link] Customer.

Goal: You want to see the customer’s Email and Address in the Orders table without manually copying and pasting it.

Solution: In your Orders table, you would create two Lookup fields:

  • Lookup 1 (Email): This field “looks at” the [Link] Customer field and “pulls” the Email field.
  • Lookup 2 (Address): This field also “looks at” the [Link] Customer field and “pulls” the Address field.

Now, when you link an order to a customer, their email and address will automatically appear in your Orders table. If you update the customer’s address in the Customers table, it automatically updates in the Orders table.

Frequently asked questions

This is a common question. They all work together:

  • Link to Table: This is the first step. It creates the relationship between records in different tables (e.g., links an Order to a Customer).
  • Lookup: This displays a specific piece of data from the linked record (e.g., shows the Customer's Email). It is read-only.
  • Rollup: This performs a calculation on the linked records (e.g., counts the number of orders for a customer or sums their total spent).

Why can’t I edit a Lookup field?

Lookup fields are read-only by design. They are simply a “window” that displays data from another table. To change the value in a Lookup field, you must edit the original data in the linked record.

Can I look up a value from another Lookup field?

Yes. If Table B has a Lookup field pulling data from Table C, your Table A can link to Table B and look up the value from that Lookup field. You can chain lookups together.


Still need help? If you’re looking for something else, please feel free to make recommendations or ask us questions; we’re ready to assist you.