> For the complete documentation index, see [llms.txt](https://docs.fabricplan.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fabricplan.com/powertable-sheets/how-tos/adding-columns-overview/add-visual-column/multi-select-relationship-column.md).

# Multiselect relationship column

A multi-select relationship column lets you associate one or more records from a lookup table with each record in the primary table. It uses a relation table to store the relationships between the primary and lookup tables, enabling many-to-many associations.

By retrieving values from a lookup table, multi-select relationship columns help maintain data consistency, reduce manual data entry, and ensure that users select only valid values.

In this article, you learn how to add a multi-select relationship column to a primary table and add column values that are fetched from the records in a lookup table.

### Prerequisites

Before creating a multi-select relationship column and configuring a many-to-many lookup, make sure that the following tables exist in the database:

* The primary table that contains a primary key.
* The lookup table that contains a primary key and one or more columns with selectable values.
* The relation table that contains an identity column and foreign keys that reference the primary key columns in the primary and lookup tables.

{% hint style="info" %}

#### Note

Make sure that the relation table includes an identity column. When you create the table, select that column as the **Identity Column** in the **Configure Table** window.
{% endhint %}

If the required tables do not exist in the database, create or import them to the database before configuring the multi-select relationship column.

You can import them using PowerTable from external sources such as Excel or CSV files. To learn more, see [this section](/get-started/create-a-table-app-with-powertable-sheets.md).

### Add multi-select column

In the following example, you'll add a *Sales Rep* multi-select column to the *Products* table so you can assign one or more sales representatives to each product.

This column retrieves column values from the *Sales Representatives* table (lookup table) using the relationship information obtained from the *Relation\_table\_products* table (relation table).

{% hint style="info" %}
A relation table stores or updates the mapping between products and sales reps as we assign and unassign sales reps to the products.
{% endhint %}

To add a multi-select column:

1. Select **Insert Column** > **Visual Column** > **Add Multi-Select Relationship Column**.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FmgY4oiDJWcNM3SXrM8kQ%2Fimage.png?alt=media&amp;token=1e6d178f-7a50-4352-8cee-3fc98bdebfe5" alt=""><figcaption></figcaption></figure>

2. Enter a name for the column in the **Column Name**. Here, enter the name as *Sales\_Rep.*
3. Enter the lookup table details. This is the table from which the list of values for each record will be retrieved. Use the dropdown menus to select the items listed below.

* **Lookup Table**: *Sales Representatives*
* **Lookup Value**: *FirstName*
* **Lookup Key**: *Sales Rep Key*

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FxJubXNCRbxh8iDqpUbEt%2Fimage.png?alt=media&amp;token=67442ec4-7f8a-4bf6-9f62-f524bf528e48" alt=""><figcaption></figcaption></figure>

4. Specify the **relation table**, the **reference column** that stores the lookup table key, and the **identifier column** used to match records between the primary table and the lookup table. These mappings are used to establish and maintain the relationship between the tables.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F9T9XL8lSSonknOvKv6Rq%2Fscreenshot_14.png?alt=media&amp;token=57041765-8115-4530-9d50-3c036f9721be" alt=""><figcaption></figcaption></figure>

Use the dropdown menus to select the relation table details and identifier column:

**Table**: *Relation\_table\_products*

**Reference Column**: *Sales Rep Key* (lookup key)

**Identifier Column**: *ProductKey* (matching column between the tables)

5. Select [default value](/powertable-sheets/how-tos/configure-column-properties/general.md#default-value) if needed.
6. Select **Save.**

You have now added a multi-select relationship column that lets you assign multiple sales representatives to each product. The column also looks up and displays the corresponding sales representatives for each product based on the data in the relationship table.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FP3kkteNVY3FkKzV9pE6S%2Fscreenshot_15.png?alt=media&amp;token=23e54e21-c545-4e92-a599-70779740595b" alt=""><figcaption></figcaption></figure>

### Enter values in the column

To enter values into the multi-select column, select the cell and choose one or more from the list.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FbySCBoXKZCfuVJ7lfcWb%2Fimage.png?alt=media&amp;token=9b6adb47-c8b4-4c5f-aea5-ef445aa925b3" alt=""><figcaption></figcaption></figure>

Select **Save to Database** and **Proceed** to save your changes to the database.

The relation table is also simultaneously updated based on the selected values.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FboBAr97XLXH1oHxu4TnZ%2Fscreenshot_17.png?alt=media&amp;token=fdae9880-44ce-44ad-add7-ed287f60fb8f" alt="" width="563"><figcaption></figcaption></figure>

### Add new lookup records

If you want to add options from the lookup table that aren't currently available for the record, you can add them directly from the lookup column in the **Products** table.

1. Select the lookup cell, and then select the drop-down arrow.
2. Select **+ Add**.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FIfCs68dTOWuvIC3wOJC6%2FScreenshot%202026-07-30%20153755.png?alt=media&amp;token=3d37d4ec-09f6-473a-891d-8dea36e8262d" alt=""><figcaption></figcaption></figure>

3. Select one or more records from the lookup table and select **Add**.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FHHz4QCVDaVmZn3OUBePv%2Fscreenshot_19.png?alt=media&amp;token=3d9a05a6-2164-41bb-915c-cd6d7cec6a66" alt=""><figcaption></figcaption></figure>

The selected records are added to the current record and become available in the drop-down list for that record.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FC27tV3lYyQx66FZ3Zb9c%2Fimage.png?alt=media&amp;token=2d69aaf1-0d96-415f-95b2-5713894b9df8" alt=""><figcaption></figcaption></figure>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fabricplan.com/powertable-sheets/how-tos/adding-columns-overview/add-visual-column/multi-select-relationship-column.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
