> 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.
