# Adding "None" selection option to dropdown list

**URL:** <https://forum.inductiveautomation.com/t/adding-none-selection-option-to-dropdown-list/12768>\
**Category:** Ignition\
**Created:** [March 9, 2017, 3:57pm UTC](https://forum.inductiveautomation.com/t/adding-none-selection-option-to-dropdown-list/12768 "2017-03-09T15:57:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![caitlinf](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@caitlinf](https://forum.inductiveautomation.com/u/caitlinf)\
**Post date:** [March 9, 2017, 3:57pm UTC](https://forum.inductiveautomation.com/t/adding-none-selection-option-to-dropdown-list/12768/1 "2017-03-09T15:57:08Z")

</div>

Hello again,

I am populating a dropdown list using a select query:

`Select [id],[TapeNo]
	from [Tape]`

There are no null values in the Tape table allowed. However, I would like for there to be a “none” selection option in the dropdown list with a “Selected Value” of -1 (i.e. no selection). Since that “none” selection doesn’t exist in the result set, I should probably be manually adding it in. But I don’t see any property of the dropdown list that can do that, so how could I go about it?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 9, 2017, 6:24pm UTC](https://forum.inductiveautomation.com/t/adding-none-selection-option-to-dropdown-list/12768/2 "2017-03-09T18:24:27Z")

</div>

Use your database’s Union All syntax. Something like:`Select -1 As Id, 'None' as TapeNo
Union All
Select Id, TapeNo
From Tape`Side note: Quoting requirements vary by database brand. The square brackets are specific to SQL Server, but SQL Server does support using double quotes for identifiers, per the SQL standard. It’s a good habit, in case you ever need to use another platform.

---

<div class="post-metadata">

**Author:** ![caitlinf](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@caitlinf](https://forum.inductiveautomation.com/u/caitlinf)\
**Post date:** [March 9, 2017, 6:37pm UTC](https://forum.inductiveautomation.com/t/adding-none-selection-option-to-dropdown-list/12768/3 "2017-03-09T18:37:12Z")

</div>

Yes this solution would work  
however I forgot to mention that I am executing the procedure as a stored procedure from the database

it looks like:

```auto
exec dbo.readTape
```

so a union all returns a syntax error when it sees “exec” instead of select. Is there a way to union the null row with the result set from the stored procedure? Or would I have to change the way I’m doing things? I prefer to leave the stored procedure as is, and instead add the null row from ignition.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 9, 2017, 6:51pm UTC](https://forum.inductiveautomation.com/t/adding-none-selection-option-to-dropdown-list/12768/4 "2017-03-09T18:51:39Z")

</div>

Ok. I would bind the stored procedure to a custom dataset property, then add the dummy row in a property change event that wrote the updated dataset to the .data property.

---

<div class="post-metadata">

**Author:** ![caitlinf](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@caitlinf](https://forum.inductiveautomation.com/u/caitlinf)\
**Post date:** [March 9, 2017, 6:53pm UTC](https://forum.inductiveautomation.com/t/adding-none-selection-option-to-dropdown-list/12768/5 "2017-03-09T18:53:07Z")

</div>

I will try this approach, thanks 🙂
