# \[Bug-13964\]Simple SQL query to perspective Dropdown options

**URL:** <https://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193>\
**Category:** Ignition Early Access\
**Tags:** perspective\
**Created:** [May 21, 2019, 1:25pm UTC](https://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193 "2019-05-21T13:25:44Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcaudle](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jcaudle](https://forum.inductiveautomation.com/u/jcaudle)\
**Post date:** [May 21, 2019, 1:25pm UTC](https://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193/1 "2019-05-21T13:25:44Z")

</div>

I cannot seem to bind a SQL Query into the Perspective Dropdown, Props, Options.  
My error is “Objects Found, Array Expected.”  
I modified the query return to reflect the “Value”/“Label” headers but cannot get the options to populate. I tried making a Dataset Tag fed by the query and modifying the Tag type but then I get “String Found, Array Expected” for every row in the query.  
How do I use a Perspective Dropdown?

---

<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:** [May 21, 2019, 2:05pm UTC](https://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193/2 "2019-05-21T14:05:02Z")

</div>

The “Objects Found, Array Expected.” error can be safely ignored. We have an open ticket to re-word that warning or remove it completely. Essentially it is telling you that the `dropdown.props.options` property expects an array of objects (which each contain a “value” and “label” property), but early on we failed to expect Dataset datatypes as the supplied value. Since then we’ve coerced the Dataset datatype to fit the expected structure, but we didn’t remove the warning.

You might notice that binding the options doesn’t actually change the Dropdown’s appearance in the Designer, but it’s just because the `props.value` hasn’t changed. Even with the warning you’re encountering, you can set `props.value` to a known value from the dataset and your Dropdown will work.

---

<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:** [May 21, 2019, 2:28pm UTC](https://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193/3 "2019-05-21T14:28:02Z")

</div>

I actually couldn’t find the internal ticket, so I opened a new one.

---

<div class="post-metadata">

**Author:** ![jcaudle](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jcaudle](https://forum.inductiveautomation.com/u/jcaudle)\
**Post date:** [May 23, 2019, 3:33pm UTC](https://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193/4 "2019-05-23T15:33:42Z")

</div>

Thanks for the fast reply. I find it challenging to tell what is a bug with the release and what is my not using the features correctly.

With my dropdown, ignoring the object/array error, I am seeing the actual drop down box be blank. The box has 37 blank fields corresponding to my 37 records in the dataset. Bug or a binding an issue?

---

<div class="post-metadata">

**Author:** ![osolorzano](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/osolorzano/32/6432_2.png) [@osolorzano](https://forum.inductiveautomation.com/u/osolorzano)\
**Post date:** [May 23, 2019, 5:16pm UTC](https://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193/5 "2019-05-23T17:16:54Z")

</div>

After attempting this I believe I hit a similar error because I had the binding return “Value/Label” as the headers but apparently it is case sensitive and should be “value/label”. This by chance what you are hitting also?

---

<div class="post-metadata">

**Author:** ![martinel3746](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@martinel3746](https://forum.inductiveautomation.com/u/martinel3746)\
**Post date:** [June 7, 2019, 6:57pm UTC](https://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193/6 "2019-06-07T18:57:33Z")

</div>

I’m successfully populating a dropdown with a dataset (using columns: “value” and “label”) and it is working as expected.  
The designer indicates that it is an error with a red yield with exclamation mark.  
The hover-over says “options: object found, array expected”  
I’m using version 8.0.1 (b2019050708)

---

<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:** [June 7, 2019, 7:02pm UTC](https://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193/7 "2019-06-07T19:02:15Z")

</div>

> [@cmallonee](#):
>
> The “Objects Found, Array Expected.” error can be safely ignored.

Please read above

---

<div class="post-metadata">

**Author:** ![awalker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awalker/32/6874_2.png) [@awalker](https://forum.inductiveautomation.com/u/awalker)\
**Post date:** [October 7, 2019, 5:18pm UTC](https://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193/8 "2019-10-07T17:18:55Z")

</div>

This issue was fixed in the 8.0.6 nightly build that was uploaded today (10/7)

---

<div class="post-metadata">

**Author:** ![qliu](https://avatars.discourse-cdn.com/v4/letter/q/bc8723/32.png) [@qliu](https://forum.inductiveautomation.com/u/qliu)\
**Post date:** [April 1, 2021, 1:09pm UTC](https://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193/9 "2021-04-01T13:09:15Z")

</div>

Hi, Awalker,

I am using 8.1.2 Perspective, and just have this issue since yesterday. ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/b/ab0ba51edaab4cd7ba01647e37841128c1aedb6d.png) Would you mind let me know someone has same issue? Thank you!

---

<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:** [April 1, 2021, 2:51pm UTC](https://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193/10 "2021-04-01T14:51:45Z")

</div>

@qliu `instances` from an embedding component is NOT the same as `options` for a dropdown, and the same rules do not hold true. You must convert your data to the expected array type for the instances property.

The easiest way to do this is to change the Return Format from “auto” to “json” in the Query Binding dialog:

 ![Screen Shot 2021-04-01 at 7.50.52AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/d/0db8bcde04332a69087a82a7ad0c7b976d442a94.png)

---

<div class="post-metadata">

**Author:** ![qliu](https://avatars.discourse-cdn.com/v4/letter/q/bc8723/32.png) [@qliu](https://forum.inductiveautomation.com/u/qliu)\
**Post date:** [April 1, 2021, 9:25pm UTC](https://forum.inductiveautomation.com/t/bug-13964-simple-sql-query-to-perspective-dropdown-options/25193/11 "2021-04-01T21:25:40Z")

</div>

Thank you so much! It is working now!  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/b/2bb7821a44946263cd2c06a99f4506595da8a245.png)
