# Perspective table component header disappears when data is empty

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-component-header-disappears-when-data-is-empty/56556>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [February 25, 2022, 9:47am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-header-disappears-when-data-is-empty/56556 "2022-02-25T09:47:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahsasalimi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mahsasalimi/32/68520_2.png) [@mahsasalimi](https://forum.inductiveautomation.com/u/mahsasalimi)\
**Post date:** [February 25, 2022, 9:47am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-header-disappears-when-data-is-empty/56556/1 "2022-02-25T09:47:59Z")

</div>

version 8.1.14  
I have a table with data coming from DB using a named query .  
When the data is empty , i.e. no rows match the criteria the header of my table disappears .  
is there a way to make the header titles show with empty data ?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/c/bce663295ba03df25b195ecfa740c851372b31c0.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/2/82a77a0eb3dae807bd2c9086c6d27a2926bb0c7b.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/1/a11304bb4cc69f9cb2c3b14f84160731a8340dd8.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/7/c7ec11e5aa2a3907e04fd6c2d103ab1e2c439133.png)

Also how can I get rid of the shadow under the header ?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/d/bd6326c7234c168e2e8dad78079ac830a88a063f.png)

---

<div class="post-metadata">

**Author:** ![mpoulsen921](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mpoulsen921](https://forum.inductiveautomation.com/u/mpoulsen921)\
**Post date:** [February 25, 2022, 10:15am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-header-disappears-when-data-is-empty/56556/2 "2022-02-25T10:15:39Z")

</div>

Hi there,  
I suggest adding a script transform to the binding of the data property.  
Something like this:

 ![Show headers without data in table](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/a/1ac5bbe06126055791079c183d6290227aa4558c.png)

If the dataset returned is empty ( 0 rows ) add an empty row to the dataset and return that.

---

<div class="post-metadata">

**Author:** ![mahsasalimi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mahsasalimi/32/68520_2.png) [@mahsasalimi](https://forum.inductiveautomation.com/u/mahsasalimi)\
**Post date:** [February 25, 2022, 10:50am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-header-disappears-when-data-is-empty/56556/3 "2022-02-25T10:50:28Z")

</div>

thanks! It is a nice trick 🙂  
it would have been great if the header could have been persistent regardless of data though.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 25, 2022, 11:37am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-header-disappears-when-data-is-empty/56556/4 "2022-02-25T11:37:39Z")

</div>

This css sets the header to be a line instead of a shadow

```auto
.th-container.ia_table__headContainer {
  box-shadow: none;
  border-bottom: solid 1px #00000066;
}

```

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/0/603821c4d18225a6ea047a9cb39780874fe210e8.png)

---

<div class="post-metadata">

**Author:** ![Jose\_Hervas\_Chico](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jose_hervas_chico/32/69260_2.png) [@Jose\_Hervas\_Chico](https://forum.inductiveautomation.com/u/Jose_Hervas_Chico)\
**Post date:** [July 24, 2026, 8:13am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-header-disappears-when-data-is-empty/56556/5 "2026-07-24T08:13:10Z")

</div>

Is there now any clean solution for that? I would like to use also the "emptyMessage" property
