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

perspective
#1

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?

0 Likes

#2

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.

0 Likes

#3

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

0 Likes

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

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?

0 Likes

#5

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?

0 Likes

#6

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)

1 Like

#7

Please read above

0 Likes

#8

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

0 Likes