> 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

Various examples showing how to use the Dynamic List question type within Keyfax.

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="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2FV53SODU2kzk5uzpR4Ji4%2Fimage.png?alt=media&amp;token=b8987589-ebb5-43dc-8006-7e08f4b2a2f6" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2Fb1bPjLKGG07P2VpNlCW9%2Fimage.png?alt=media&amp;token=614734d9-0ce6-46f7-baad-467d2ba69930" 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="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2FWWKJCqBgvFHJddYnYmyS%2Fimage.png?alt=media&amp;token=adf45bef-8064-4106-b5de-0d1c3db0fb38" alt=""><figcaption></figcaption></figure>
