# Lookup 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

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

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

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

### 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** — makes the field available for search/filtering in the mailbox UI (if enabled in your setup)
* **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="/files/7FGvDXzD7ZwZ6ew27A9c" 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: 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:

```
GET https://support.docstudio.com/user/template-builder/template-dynamic-fields/lookup-field.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
