Skip to content

Updating visuals

If you see any images containing outdated UI, please bear with us.

We are updating all content as quickly as possible to mirror our new UI.

Return

Link records from different tables

Create relationships between tables and use linked records in your interface and APIs.

Steps at a glance ​

  1. Decide what you want to link (one-to-one, one-to-many, or many-to-many).
  2. Create a relationship column between your tables.
  3. Create records and link them together.
  4. Retrieve linked records in your interface (or from an API).

Before you add a relationship, clarify how the data should connect:

  • One-to-one — One record links to one record (for example, User → Profile). Add the link column, then turn on Value must be unique so each record can only be linked once.
  • One-to-many — One record links to many records (for example, Customer → Orders). Add the link column in the "many" table (Orders).
  • Many-to-many — Many records link to many records (for example, Students ↔ Courses). Create a third table (for example Enrollments) with one link column to each table.

2) Create a relationship between two tables ​

Example: Customers and Orders (one customer can have many orders).

  1. Open the Data & API tab, then open the Tables subtab.
  2. Open the table you want to edit (for example Orders).
  3. Click the + at the end of the column headers to add a column.
  4. Enter a Column Name (for example customer).
  5. Choose Link to another Table as the Column Type.
  6. In Linked Table, select the table you want to link to (for example Customers).
  7. Click Add Column.
The Add column panel opened from the plus button of the tasks table, with project as the Column Name, Link to another Table as the Column Type, projects as the Linked Table and the Add Column button
  1. Create a Customer record.
  2. Create an Order record.
  3. In the Order record, click the pencil icon of the customer field, then click the customer you created in the list.
The Update Row window of a task, with the pencil icon of its project fieldThe Select projects window listing the records of the projects table, with the Website redesign row under the pointer

Now each order is linked to a specific customer.

4) Use linked records in your interface ​

There are two common ways to use linked records:

Option A: Retrieve records with a view ​

  1. Create a view for the table you want to show (for example Orders).
  2. Add any filters you need (for example “Only show orders for the current user’s customer record”).
  3. In your interface, retrieve the view and repeat items over the results.
  4. Display fields from the linked record (for example show the order’s customer name). To include them in the view results, open the view's Columns panel and, under References, turn on the linked table (for example customers (via customer)). Learn more →
The Columns panel of the My tasks view, with the projects (via project) relationship under References

Option B: Retrieve records from an API ​

Use an API when you need custom filtering, validation, or secure logic.

  1. Create an API from the API Endpoints tab in the Backend Workflows subtab of Data & API (for example GET /orders).
  2. Retrieve the records you need.
  3. Return the records to the interface and repeat items over the response.

Common pitfalls ​

The relationship field is empty ​

  • Make sure you actually set the relationship field when creating or updating the record.

You chose the wrong relationship type ​

  • If one customer should link to many orders, put the link column in the Orders table and make sure Value must be unique is turned off. Otherwise, each customer can only be linked to one order.

Records appear but the linked data is missing ​

  • Check that the records are truly linked (open a record and confirm the relationship field has a value).
  • If you are using a view, confirm the view includes the columns you need.