# Dropdown

**Dropdown** controls are one of the most popular controls used to select a single value from a list of options. They are often used to set a status, tag records with specific labels or simply pick one value from multiple options.

Dropdowns can be custom (user-driven options) or countries (pre-set list of countries with flags).

**Data type**: `string`

### Adding a Dropdown control

1\. Edit your sheet\
2\. Click on the **Qommentary Writeback** extension\
3\. Expand **Input Column** section\
4\. Click on **Add column**

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZCvqSqKXuXT2WpbY2f%2F-MZCx6ezSPuMpGDkleyH%2Fimage.png?alt=media&#x26;token=c8a0c47a-fd65-447f-9bcf-fb1394cce274" alt=""></div>

5\. Select **Dropdown** from the dropdown menu

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZNzTU6_jJ1Q3lXDg4M%2F-MZO4fXlG3YHSNJrDvka%2Fimage.png?alt=media&#x26;token=fde7d5fc-29f0-411c-ad71-7f563962b8b9" alt=""></div>

6\. Add a **label** to be displayed as a column header

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZNzTU6_jJ1Q3lXDg4M%2F-MZO4nOnKLkwe3jB9zPQ%2Fimage.png?alt=media&#x26;token=33cb1315-e6b7-4bee-a95e-7c93314df261" alt=""></div>

7\. Add a **field** name

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZNzTU6_jJ1Q3lXDg4M%2F-MZO4v2OapPjtEuxkr0X%2Fimage.png?alt=media&#x26;token=06b0c556-7570-4ba8-906c-419775c383ca" alt=""></div>

{% hint style="danger" %}
If database is selected as data connection, then field name **must map** to destination table column name.
{% endhint %}

{% hint style="warning" %}
Field name cannot contain spaces.
{% endhint %}

8\. Click on **Done**

**Dropdown** input column can now be updated and saved.

![](https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZBs5_btXGLgn8PwPxC%2F-MZBuYDJpuImDndNbNwZ%2Fimage.png?alt=media\&token=1cfcc3e6-202b-4935-9114-6a8c49e9871f)

### Custom dropdowns

If you wish to create dropdowns with custom values, please please follow these steps:

1\. Edit your sheet and select the Qommentary Writeback extension\
3\. Expand the *Input Columns* section and **Dropdown** input control\
4\. Scroll down to *Dropdown Type* and select **Custom** from the dropdown menu

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MfWuh4AY86eB3a6ePDo%2F-MfWwf-wYyXxHoXfiQxr%2Fimage.png?alt=media&#x26;token=c0076f24-8cc4-481a-830f-c4da687a3d30" alt=""></div>

5\. Click on **Add option**

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZBdfBopGpRCzwVbHAR%2F-MZBherR_nCCxnrQCuW5%2Fimage.png?alt=media&#x26;token=fed25eda-baba-4ed1-9f49-b1bb7414bb39" alt=""></div>

6\. Enter an option **Name**

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZBdfBopGpRCzwVbHAR%2F-MZBilGHheGwXYdbtmyr%2Fimage.png?alt=media&#x26;token=f9b7ccf3-5518-4090-ba18-a3eff08da699" alt=""></div>

7\. Repeat steps 5 and 6 as many times as needed

{% hint style="success" %}
The custom options are now displayed in the dropdown column
{% endhint %}

![](https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZBdfBopGpRCzwVbHAR%2F-MZBj4E0aFBBaCGiOSAA%2Fimage.png?alt=media\&token=52532bce-7cb4-40ef-80be-8ee140099c87)

### Dimension dropdowns

If you wish to use a field or dimension as the source for your dimension values, please follow these steps:

1\. Edit your sheet and select the Qommentary Writeback extension\
2\. Expand the *Input Columns* section and **Dropdown** input control\
3\. Scroll down to *Dropdown Type* and select **Dimension** from the dropdown menu

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MfWuh4AY86eB3a6ePDo%2F-MfX02fy0vMNZFch_5WJ%2Fimage.png?alt=media&#x26;token=d5efe73e-1d0d-4c29-8636-38a8af0e2d8c" alt=""></div>

4\. Update the expression with the field name you would like to use

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MfWuh4AY86eB3a6ePDo%2F-MfX0HFZ5y_43Q4Nu7uS%2Fimage.png?alt=media&#x26;token=92334ebd-4efe-4d2c-bba4-ae5f876d8aaa" alt=""></div>

{% hint style="success" %}
The field dimension values are now displayed in the dropdown column
{% endhint %}

![](https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MfWuh4AY86eB3a6ePDo%2F-MfX1SNB9pEH8eAoYqmD%2Fimage.png?alt=media\&token=74aae057-b998-4a00-9383-da540153e43d)

### Country dropdowns

The Dropdown control includes a curated list of countries with corresponding flags which you can use out of the box in your writeback table.

To create a countries dropdown, please follow these steps:

1\. Edit your sheet and select the **Qommentary Writeback** extension\
3\. Expand the *Input Columns* section and **Dropdown** input control\
4\. Select **Countries** from the dropdown menu

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZBdfBopGpRCzwVbHAR%2F-MZBrS0WcT1aI6vrKuoA%2Fimage.png?alt=media&#x26;token=a819a203-5aba-451a-a45e-b746c6980f5e" alt=""></div>

{% hint style="success" %}
A full list of countries with flags are now displayed in the dropdown column
{% endhint %}

![](https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZBdfBopGpRCzwVbHAR%2F-MZBru7mzi7Vs3Jae9BL%2Fimage.png?alt=media\&token=745ef846-cdce-4130-a671-b77f707af914)
