> For the complete documentation index, see [llms.txt](https://docs.jetadmin.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jetadmin.io/user-guide/data/relationships/link-records-across-tables.md).

# Link records across tables

Create relationships and link rows together.

Create a relationship using a **Link to record** field. Match stable record IDs rather than names, which can change or repeat.

## Understand the relationship

For example, each order has one customer, while a customer can have many orders:

| Orders.id | Orders.customer\_id | Customers.id | Customers.name |
| --------- | ------------------- | ------------ | -------------- |
| 101       | 1                   | 1            | Ada            |
| 102       | 1                   | 1            | Ada            |
| 103       | 2                   | 2            | Grace          |

A single linked record on each order is the many-to-one side of this relationship. It is not automatically a one-to-one relationship. One-to-one also requires that the customer is used by only one order.

## Configure the link

1. Open the field containing the related record's ID, such as **customer\_id** on Orders.
2. Open its field type and choose **Link to Record**.
3. Select the related **Resource** and **Collection**, such as Customers.
4. Review the related field used to match IDs.
5. Choose a **Display Field**, such as the customer's name, to make the linked record readable.
6. Check Orders 101 and 102: both should resolve to Ada. Order 103 should resolve to Grace.

The related field identifies the record; the display field controls the label you see.

The following existing walkthrough uses Customers and Companies to demonstrate the same configuration:

{% @arcade/embed url="<https://app.arcade.software/share/PkoE2rQCX69JW2AfSjYO>" flowId="PkoE2rQCX69JW2AfSjYO" %}

## Jet Tables example: link a ticket to a customer

In Jet Tables, add a **Link to record** field named **Customer**, select **Customers** as the related table, and choose **Name** as the display field. This form uses the related table's record identity; it does not show a separate matching-field selector.

<figure><img src="https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FCo0tnMpd1UFpeKla5OuX%2FS14-link-record-configuration.jpg?alt=media" alt="Customer link field targeting Customers with Name as the display field"><figcaption><p>Configure the related table and the label displayed in the grid.</p></figcaption></figure>

Select the related customer on the ticket. In this separate template-data example, ticket 1 is linked to customer 5, **Ada Gazey**. These sample records differ from the Orders example above.

<figure><img src="https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FEHOVgdDjWWQPjRAyHWDW%2FS15-ticket-linked-customer.jpg?alt=media" alt="Customer cell displaying Ada Gazey"><figcaption><p>The saved link displays the related customer's name.</p></figcaption></figure>

## If a record does not link

Check that the target ID exists, both fields use compatible value types, and the target IDs are unique. Check blanks and formatting differences before changing the relationship.

For collections where records on both sides can have several links, see [Many-to-many relationships](/user-guide/data/relationships/many-to-many-relationships.md). To display related values or totals, use [Lookup](/user-guide/data/computed-fields/lookup-column.md) or [Rollup](/user-guide/data/computed-fields/rollup-column.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.jetadmin.io/user-guide/data/relationships/link-records-across-tables.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
