> For the complete documentation index, see [llms.txt](https://docs.keyfax.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keyfax.biz/product-suite/admin/entities/questions/dynamic-lists/dynamic-list-examples.md).

# Dynamic List Examples

Dynamic Lists can be used to present any data from a SQL Server database during a Keyfax script. On this page we provide a few common examples to help you get started with Dynamic Lists.&#x20;

### Joining Multiple Columns into a single Dynamic List

You may have data in different table columns that you wish to display as a single list via a Dynamic List question type. To acheive this you can use the SQL `UNION` operator as demonstrated below.

In this example we'll query for 3 phone numbers for the current caller from different table columns and display found phone numbers within a Dynamic List. You can see the SQL below\...

<figure><img src="/files/4pOPtppu6Jc4yPhavO5G" alt=""><figcaption></figcaption></figure>

The results are shown below. In this example only 2 phone numbers were found...

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

#### Handling NULLs

If your columns allow and contain nulls you may need to filter out the null values so these don't appear in the Dynamic List as shown below\...

<figure><img src="/files/G5Sch0bFh4k4rpuFaA76" 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.keyfax.biz/product-suite/admin/entities/questions/dynamic-lists/dynamic-list-examples.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.
