I don’t understand how to display data from a SQL query in a perspective table. I have a named query that works great, just plop it into the Vision power table and you have a few rows and columns in about 5 seconds.
How do we display data in the Perspective table? It seems bewilderingly complex or I am missing something? I see from the forums a dataset or array, so should I transform the data into an array somehow? An example or documentation would be greatly appreciated.
Thanks!
If you have a working Named Query, all you should need to do is bind the Table.props.data field with a Query Binding, and select the Named Query by specifying the Path of the Query (or using the magnifying glass icon to search for it).
Thank you sir, you helped me figure it out, I didn’t have quotes around the static named query filter. It just said “Error_Configuration” and I didn’t see anything in the console to help me with my ID10T error.
1 Like
I have met the same question, has it solved yet?
Did you try the solution above? If so, what happened? We need some more details in order to be able to help you with this.
If the named query “Value” is a static string, put quotes around it and it works.
@KathyApplebaum, I just ran into this issue myself.
It would appear that the Named Query binding in Perspective is not handling strings properly. In order to avoid getting the error listed below and null returned from the binding, single quotes must manually be added to the strings that are being passed as Named Query parameters. This is using “Value” type parameters with their datatype set to string.
I am running 8.0.5 Stable.
It is worth noting that within the Named Query “Testing” tab, the query runs fine without the single quotes added to the parameter values. I haven’t noticed this issue in Vision or Reporting.
Without single quotes:
With single quotes:
Error text:
RuntimeException: Syntax Error on Token: ‘End of Expression’ (Line 0 , Char 0)
1 Like
The reason you need quotes for literal string parameters in the named query binding is because the inputs there are Expression editors which you can tell by the little fx
symbols on the right. Expressions require that literal strings be in quotes just like when doing an expression binding.
3 Likes
Ah, ok. That makes a lot more sense. Thanks.