Page Parameter and populating page button labels with Database Information

Hi I am using Ignition 8 and a perspective page.

I have been going through the videos, and determined that I need to use a view parameter to get me started.

I have a simple database table called reference test, with 2 fields in it. code and text.

When the page parameter matches the data in the code field, I want to get the text field information and place it on a button label.

So far I have managed to get the parameter information but not sure how to use this to get the relevant information from the database.

Please could someone help me with this.

Thanks Laurie

I have managed to work some of this out, but even though it works well on the front end it shows an error with not much detail as below What am I missing here ?

I don’t think you can reference Datasets with that notation.
Try changing the Return Format dropdown to “json”, and use the following script transform to get your value:

return value[0]['code']

If you’d prefer to avoid requiring transforms in the future, you could switch your Named Query to be a scalar query.