# Prespective: Add values to dropdown from tag (Query based)

**URL:** <https://forum.inductiveautomation.com/t/prespective-add-values-to-dropdown-from-tag-query-based/27172>\
**Category:** Ignition\
**Created:** [August 5, 2019, 5:35pm UTC](https://forum.inductiveautomation.com/t/prespective-add-values-to-dropdown-from-tag-query-based/27172 "2019-08-05T17:35:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![David.Bell](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@David.Bell](https://forum.inductiveautomation.com/u/David.Bell)\
**Post date:** [August 5, 2019, 5:35pm UTC](https://forum.inductiveautomation.com/t/prespective-add-values-to-dropdown-from-tag-query-based/27172/1 "2019-08-05T17:35:40Z")

</div>

![Ignition_Dropdown_values](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/ffd1304b946a1784427dddc59239a9984d83215d.jpeg) Hello,

I cannot find any information on how to add values to a dropdown in Perspective using the tag (Query). This would be very helpful. I do not want to write a named query or manually add items.

Thanks,

David

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [August 5, 2019, 5:54pm UTC](https://forum.inductiveautomation.com/t/prespective-add-values-to-dropdown-from-tag-query-based/27172/2 "2019-08-05T17:54:43Z")

</div>

Your dataset is 30x7

You use the options binding and have to and need data set to be Label and Value

SELECT col1 as ‘value’, col2 as ‘label’ FROM db.table;

[https://docs.inductiveautomation.com/display/DOC80/Perspective+-+Dropdown](https://docs.inductiveautomation.com/display/DOC80/Perspective+-+Dropdown)

Check out the properties in the options portion of the component ![data](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/820d87c0900797eff4a58a17739b9363da5d5325.jpeg)

---

<div class="post-metadata">

**Author:** ![David.Bell](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@David.Bell](https://forum.inductiveautomation.com/u/David.Bell)\
**Post date:** [August 5, 2019, 6:10pm UTC](https://forum.inductiveautomation.com/t/prespective-add-values-to-dropdown-from-tag-query-based/27172/3 "2019-08-05T18:10:59Z")

</div>

Thank you for the quick response and the pic. It does work. Thanks. Do I need to be concerned that it looks like it has an error even though it works?

Thanks.

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [August 5, 2019, 6:29pm UTC](https://forum.inductiveautomation.com/t/prespective-add-values-to-dropdown-from-tag-query-based/27172/4 "2019-08-05T18:29:27Z")

</div>

It is a known bug. Although I thought It was remedied in one of the recent builds. Make sure value and label are lowercase too.

> [@\[Bug-13964\]Simple SQL query to perspective Dropdown options](http://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193/3):
>
> I actually couldn’t find the internal ticket, so I opened a new one.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [August 5, 2019, 6:32pm UTC](https://forum.inductiveautomation.com/t/prespective-add-values-to-dropdown-from-tag-query-based/27172/5 "2019-08-05T18:32:56Z")

</div>

I believe you could also change the Return Format to json as part of the binding, and as long as the columns are `label` and `value`, it should work.  
 ![43%20AM](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9b00bc2d0875db38b49995bbfd375bc0c16e533c.png)

---

<div class="post-metadata">

**Author:** ![David.Bell](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@David.Bell](https://forum.inductiveautomation.com/u/David.Bell)\
**Post date:** [August 5, 2019, 6:41pm UTC](https://forum.inductiveautomation.com/t/prespective-add-values-to-dropdown-from-tag-query-based/27172/6 "2019-08-05T18:41:03Z")

</div>

Thanks, I did do as lowercase.
