> For the complete documentation index, see [llms.txt](https://docs.powertable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.powertable.com/explore-powertable/approval-flow/approval-using-a-lookup-table.md). Agents can also search and read this documentation through its [MCP server](https://docs.powertable.com/~gitbook/mcp).

# Approval using a Lookup Table

### Get the approver details **from a Lookup Table**

In this method, you can select the approvers based on rules, by looking up data from another table.

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2Fay9FyMj4as3EqEnG9CJO%2Fimage.png?alt=media&amp;token=6ffbe706-ae71-419c-b320-e02a59434eb3" alt=""><figcaption><p>Users that meet rules from a lookup table</p></figcaption></figure>

&#x20;The options are explained below:

* **Lookup Table**: This dropdown menu displays a list of tables in the connection. Select the table from which the approvers list is to be looked up/fetched.
* **Column Containing Approvers**: Choose the column containing the approvers' email IDs.

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2FR9G52ESWv9SSdjqBySDn%2Fimage.png?alt=media&amp;token=f0886324-c902-4c52-b675-83b48ab493aa" alt=""><figcaption><p>Lookup table details</p></figcaption></figure>

The next step is to map the matching columns from the lookup table to their corresponding columns in the source table to join the tables.

* **Source Table Column to apply filter:** Select the column from the source table that is also present in  the lookup table.
* **Matching Lookup Table Column:** Map the matching column from the lookup table.
* You can set multiple conditions (join multiple shared columns) as needed, by clicking on **Add Condition.**

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2F4BVk9eMGmRvBShO5UQH8%2Fimage.png?alt=media&amp;token=50f9aaae-e3fd-4c04-a0b4-8501276b75b1" alt=""><figcaption><p>Filter conditions</p></figcaption></figure>

In the above example, each subcategory in the lookup table has a person-in-change with their Email IDs added in the 'Approvers' column. By mapping the subcategory name columns from both tables, we allow the approvers' email IDs to be fetched for each subcategory.&#x20;

* **Default Approvers**: Specify the default approvers to approve changes that do not involve the above-set conditions (subcategories with no approver details). Click **Save.**

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2FuVUIY08xTYSrENbVo0eL%2Fimage.png?alt=media&amp;token=4d603ccf-32d6-4f60-8959-6820895a0c88" alt=""><figcaption><p>Default approvers</p></figcaption></figure>

* Click on **Preview Rules** to view the approvers list for each subcategory.&#x20;
* You can use the **Sync Rules** option to sync the connected lookup table to fetch the latest data. The last sync details and the status can also be seen.


---

# 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.powertable.com/explore-powertable/approval-flow/approval-using-a-lookup-table.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.
