# Page Parameter and populating page button labels with Database Information

**URL:** <https://forum.inductiveautomation.com/t/page-parameter-and-populating-page-button-labels-with-database-information/32517>\
**Category:** Ignition\
**Created:** [February 22, 2020, 11:08am UTC](https://forum.inductiveautomation.com/t/page-parameter-and-populating-page-button-labels-with-database-information/32517 "2020-02-22T11:08:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lozzer65](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@lozzer65](https://forum.inductiveautomation.com/u/lozzer65)\
**Post date:** [February 22, 2020, 11:08am UTC](https://forum.inductiveautomation.com/t/page-parameter-and-populating-page-button-labels-with-database-information/32517/1 "2020-02-22T11:08:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lozzer65](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@lozzer65](https://forum.inductiveautomation.com/u/lozzer65)\
**Post date:** [February 22, 2020, 2:02pm UTC](https://forum.inductiveautomation.com/t/page-parameter-and-populating-page-button-labels-with-database-information/32517/2 "2020-02-22T14:02:14Z")

</div>

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 ?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/0cba8a7d59952aa5b7acf9ecbc1c03021673f6bb.png)

---

<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:** [February 24, 2020, 3:45pm UTC](https://forum.inductiveautomation.com/t/page-parameter-and-populating-page-button-labels-with-database-information/32517/3 "2020-02-24T15:45:57Z")

</div>

I don’t think you can reference Datasets with that notation.  
 ![30%20AM](https://us1.discourse-cdn.com/inductiveautomation/original/2X/d/dfcfd47c805ad858df9e5b918f823146046328fe.png)  
Try changing the Return Format dropdown to “json”, and use the following script transform to get your value:

```auto
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.
