> 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/documentation/plan/powertable-sheets/how-tos/configure-column-properties/lookup-and-relation.md).

# Lookup and relation

This article explains how to configure columns that use the **Single Select** input type.

Single-select columns allow users to choose a value from a predefined list of options. You can configure the available options in one of the following ways:

* [**Manual**](#manual) - Define the dropdown options manually.
* [**Distinct Values**](#distinct-values) - Generate dropdown options from existing column values.
* [**Lookup**](#lookup) - Retrieve dropdown values from another table, typically to establish foreign key relationships.

Using predefined options helps maintain data consistency, simplify data entry, and standardize values across records.

The following sections describe how to configure each option source.

### Manual

Use the **Manual** option to define dropdown values and labels directly.

To configure dropdown values manually:

1. In the column setup window, select the pencil icon next to the required column.
2. Set **Input Type** to **Single Select**.
3. Select **Manual** as the **Values Type**.<br>

   <figure><img src="/files/mHjhRXpuFsqAA6W2qyS3" alt=""><figcaption></figcaption></figure>
4. Enter the required options and labels. Then, configure the background color for each label.
5. Select **Save**.<br>

   <figure><img src="/files/qMJHWtuURVXddCsVtIJm" alt=""><figcaption></figcaption></figure>

Use **Add** to create additional options or the delete icon to remove an existing option.

<figure><img src="/files/vTkfn0KWCQmyGMmg1hbL" alt=""><figcaption></figcaption></figure>

After the configuration is saved, you can select values from the configured dropdown list when editing records.

<figure><img src="/files/inz1w8INR6YqUPP0BE1q" alt=""><figcaption></figcaption></figure>

### Distinct Values

Use the **Distinct Values** option to generate dropdown values from the existing values in the selected column.

To configure dropdown values from existing data:

1. Select the pencil icon next to the required column.
2. Set **Input Type** to **Single Select**.
3. Select **Distinct Values** for the **Values Type**.
4. Select **Save**.<br>

   <figure><img src="/files/IABtv7BCj5jInXXinSOu" alt=""><figcaption></figcaption></figure>

PowerTable creates a unique list of values from the selected column and uses them as dropdown options. You can then select values from the generated dropdown list.

<figure><img src="/files/fUoyhB9Y4BJ8Ra1nVw8c" alt=""><figcaption></figcaption></figure>

### Lookup

Use the **Lookup** option to retrieve dropdown values from another table.

This option is commonly used to display user-friendly values for foreign key fields while storing the corresponding key values in the database.

To configure a lookup table:

1. Select the pencil icon next to the required column.
2. Set **Input Type** to **Single Select**.
3. Select **Lookup** as the **Values Type**.
4. In **Lookup Schema**, select the schema that contains the lookup table.
5. In **Lookup Table**, select the table that contains the lookup values.
6. Under **Lookup Key Column**, select the current table column that contains the key values.
7. Under **Lookup Display Column**, select the lookup table column that contains the values to display.
8. Select **Save**.

<figure><img src="/files/9HCX1caXSYz1hxqjRthc" alt=""><figcaption></figcaption></figure>

Optionally, select **Add Hierarchy** to configure additional levels in the lookup hierarchy. To remove a hierarchy level, select the **Delete** icon next to it.

<figure><img src="/files/XxXRH6AsVHj2ZIkbPww9" alt=""><figcaption></figcaption></figure>

After a lookup is configured, the key values in the current table are replaced with the corresponding display values from the lookup table.

For example, consider a *Products* table that contains a *ProductSubcategoryKey* column with key values.&#x20;

<figure><img src="/files/WZjJRgRACJ6xgorXl1tj" alt=""><figcaption></figcaption></figure>

The *Subcategory* table serves as the lookup table and contains the *ProductSubcategoryKey* column along with the corresponding *SubcategoryName* values.

<figure><img src="/files/LOpzqtBCLmSiuNVYc0oe" alt=""><figcaption></figcaption></figure>

When the lookup is configured, the key values in the *ProductSubcategoryKey* column are replaced with the corresponding label values from the *SubcategoryName* column. This makes the data more readable and easier to understand.

When inserting or editing records, users can select values from the lookup-based dropdown list.

<figure><img src="/files/eL7TrLKT29Taesd17NOb" alt=""><figcaption></figcaption></figure>

#### Filter based on another column

Use the **Filter based on another column** option to further restrict the lookup values displayed in the dropdown list.

You can configure one or more matching column pairs between the current table and the lookup table. When a filter is applied, only lookup values that satisfy all configured matching conditions are displayed.

<figure><img src="/files/6QuoBKCQIaxFVkodNrRy" 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/documentation/plan/powertable-sheets/how-tos/configure-column-properties/lookup-and-relation.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.
