# A Table with Empty NamedQuery

**URL:** <https://forum.inductiveautomation.com/t/a-table-with-empty-namedquery/96503>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 26, 2024, 3:21pm UTC](https://forum.inductiveautomation.com/t/a-table-with-empty-namedquery/96503 "2024-09-26T15:21:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oscar\_Serrano](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@Oscar\_Serrano](https://forum.inductiveautomation.com/u/Oscar_Serrano)\
**Post date:** [September 26, 2024, 3:21pm UTC](https://forum.inductiveautomation.com/t/a-table-with-empty-namedquery/96503/1 "2024-09-26T15:21:13Z")

</div>

Hello, I'm working on a project and I need to create a a edit table. People right now fill a table on excel, but we want to build this table on Ignition Perspective and of course save this information on a DB. At this moment I have a table which is the one that I will use to save and watch the information at the table on ignition, but at the beginning the table on the DB is empty, and I try to put it on the table but I can't even watch the columns. Why this happend and how can i solve this???

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 26, 2024, 3:23pm UTC](https://forum.inductiveautomation.com/t/a-table-with-empty-namedquery/96503/2 "2024-09-26T15:23:31Z")

</div>

> [@Oscar\_Serrano](#):
>
> beginning the table on the DB is empty, and I try to put it on the table but I can't even watch the columns

Of course the DB is empty if you haven't inserted any rows yet.

I'm not sure what "watch the columns" means.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 26, 2024, 3:26pm UTC](https://forum.inductiveautomation.com/t/a-table-with-empty-namedquery/96503/3 "2024-09-26T15:26:30Z")

</div>

Have you created the columns in the database table yet?

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [September 26, 2024, 3:30pm UTC](https://forum.inductiveautomation.com/t/a-table-with-empty-namedquery/96503/4 "2024-09-26T15:30:55Z")

</div>

Hello!

1st. you should create a named query  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/1/f1e021406a7e119ce481374d602afcd3b6649bb8.png)

2nd. connect it to your database and write the query  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/7/773212d04cdfe1f2d949aaa4db5f418367343a08.png)

3rd. add a binding to your props.data of the table (little chain icon on left of data)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/f/4fce15cbe35c422a852741975f4831166df4bbd8.png)

4th. add the path to your previous created named query

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/8/d89521d0c7952dac780bc54907ba681e4d109057.png)

and you got it.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 26, 2024, 3:50pm UTC](https://forum.inductiveautomation.com/t/a-table-with-empty-namedquery/96503/5 "2024-09-26T15:50:04Z")

</div>

> [@Alejandro\_Alaco](#):
>
> 1st. you should create a named query

No, first you should create the database table.

---

<div class="post-metadata">

**Author:** ![vtran](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vtran](https://forum.inductiveautomation.com/u/vtran)\
**Post date:** [September 26, 2024, 6:10pm UTC](https://forum.inductiveautomation.com/t/a-table-with-empty-namedquery/96503/6 "2024-09-26T18:10:58Z")

</div>

> [@Oscar\_Serrano](#):
>
> but I can't even watch the columns

Did you mean the column headers didn't show up on the table? Perspective table requires at least one row of data to show the column headers. If you already have a database table and a named query that's pulling data from it, you might want to either add a row in the database table first or add a transform to your perspective table binding to add an empty row if there's nothing in your database table initially.

---

<div class="post-metadata">

**Author:** ![Oscar\_Serrano](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@Oscar\_Serrano](https://forum.inductiveautomation.com/u/Oscar_Serrano)\
**Post date:** [September 28, 2024, 3:51am UTC](https://forum.inductiveautomation.com/t/a-table-with-empty-namedquery/96503/7 "2024-09-28T03:51:58Z")

</div>

Yeah, thank you so much. I add some information at the Database, then the columns showed up
