> For the complete documentation index, see [llms.txt](https://support.docstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.docstudio.com/user/template-builder/template-dynamic-fields/lookup-field.md).

# Lookup Field

This document explains how to add and configure the Lookup field in a template, including how it links to a Dictionary field.

Use **Lookup field** to auto-fill a value from a **Dictionary field** selection.

It returns a value from the selected **Column name** in the row chosen in the parent dictionary field.

You can place this field in:

* structured documents
* PDF documents

### Add a lookup field

{% columns %}
{% column %}

1. Open the template in edit mode.
2. Find the **Lookup field** in the **Fields panel** and add it to the template.\
   — Choose column from dictionary with required information
3. Click **Save**.
   {% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FgEUzNAHre7PsUKUNTDkV%2Fimage.png?alt=media&amp;token=bb465daa-3a0f-492d-b985-116760617260" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% hint style="danger" %}
To add a lookup field, the template must include at least one dictionary field.
{% endhint %}

### Field settings

Click on the placed field to reopen settings menu.

{% columns %}
{% column %}

* **Name** — field name shown in the document
* **Placeholder** — hint text shown before input (if empty, **Name** is used)
* **Tooltip** — additional hint shown on hover
* **Optional** — whether filling the field is required
* **Allow custom values** — allows free text input in addition to lookup values
* **Search** — **Search** — makes the field available for search and filtering in the mailbox UI. This setting is unavailable if the selected dictionary column has **Extended Character limit** enabled.
* **Document** — document where the parent dictionary field is located
* **Related to** — parent dictionary field
* **Column name** — dictionary column to return
  {% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2Fo7ST6J2iKz8RxCgQffUE%2Fimage.png?alt=media&amp;token=fa7e4db4-be92-44bd-9161-ea2a482f9f2b" alt="" width="306"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% hint style="info" %}
If the parent dictionary enforces optionality or custom values, the same rules are enforced for related lookups.
{% endhint %}

#### Links inside a lookup field

If the populated value contains a URL, it is rendered as a normal browser link (blue + underline).

* You can open the link from the right-click context menu (any role).
* You can open the link with a direct click only if the field is inactive.


---

# 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://support.docstudio.com/user/template-builder/template-dynamic-fields/lookup-field.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.
