# \[FEATURE-16500\] Perspective Table - Customize "Empty Data Source"

**URL:** <https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507>\
**Category:** Ignition Early Access\
**Tags:** ignition80, perspective\
**Created:** [July 12, 2019, 2:01pm UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507 "2019-07-12T14:01:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kasa.Jason\_K](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@Kasa.Jason\_K](https://forum.inductiveautomation.com/u/Kasa.Jason_K)\
**Post date:** [July 12, 2019, 2:01pm UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507/1 "2019-07-12T14:01:43Z")

</div>

Is the “Empty Data Source” text and/or icon on the Perspective Table editable? If not, is that a feature that could be added? Our table is only populated based on a user selection, so it would be nice to add some informative text on the table such as “Make Selection”.

---

<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:** [July 12, 2019, 4:37pm UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507/2 "2019-07-12T16:37:06Z")

</div>

It is not currently configurable, no.

An alternative option is to place the table you’re using along with a Label into a Flex Container with the following setup:

1. Bind `Table.position.display` to the property `Table.props.data`, and include a transform with the following code: `return (value is not None) and (len(value) > 0)`.
2. Set the Label text to “Make Selection”.
3. Bind `Label.position.display` to the property `Table.props.data` and include a transform with the follow code: `return (value is None) or (len(value) == 0)`.

This should make it so that when your table has data it is displayed and the label is not, and when the table does not have data, the Label is displayed while the table is not.

---

<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:** [July 12, 2019, 4:39pm UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507/3 "2019-07-12T16:39:01Z")

</div>

A more advanced solution would be to place the Table/Label combo into a separate Flex Container-based View entirely (along with their setup), and use that View via an Embedded View.

This would allow that combination to be used in other locations.

---

<div class="post-metadata">

**Author:** ![bebel](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bebel](https://forum.inductiveautomation.com/u/bebel)\
**Post date:** [May 2, 2020, 9:11pm UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507/4 "2020-05-02T21:11:24Z")

</div>

What I do is create a custom property on the table called emptyData. In designer I bind that to the data property of the table while there is a valid dataset present. Then I remove the binding but the dataset remains with the emptyData property. I then click the dataset icon for emptyData and edit to remove all rows. I then add one empty row back onto the dataset. In your case you may want to put ‘Make selection’ in one cell or across a couple of columns. Then in the startup event of the form and any scripting that makes the currently displayed data invalid (null) I set the table.data property equal to the emptyData property. That way it displays a table with proper column headers instead of the aesthetically unpleasing ‘empty data source’ banner. Note that you may need to use scripting to assign data to the table data property rather than a direct binding for this to work. I have also used a value change script on the table data property. If the new value = None I set table.data = emptyData.

---

<div class="post-metadata">

**Author:** ![tmahaffey](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tmahaffey/32/30949_2.png) [@tmahaffey](https://forum.inductiveautomation.com/u/tmahaffey)\
**Post date:** [May 11, 2020, 6:30pm UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507/5 "2020-05-11T18:30:30Z")

</div>

Ah, sounds like quite the workaround! I’m noticing that if the dataset happens to be empty, the column names are not even displayed. Not idea!

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [October 5, 2020, 6:52pm UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507/6 "2020-10-05T18:52:09Z")

</div>

I agree, this is not ideal… clunky at best. Is this something IA is going to implement?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 5, 2020, 9:08pm UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507/7 "2020-10-05T21:08:50Z")

</div>

This is an active, low-priority issue on our internal backlog. We’ll update this thread when there’s movement on the issue.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [October 5, 2020, 9:11pm UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507/8 "2020-10-05T21:11:37Z")

</div>

I’ll take active. 🙂 Thanks!

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [October 6, 2020, 7:12am UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507/9 "2020-10-06T07:12:13Z")

</div>

This probably isnt worth it, it was mostly just a fun exercise in theming, however this IS technically possible without any changes by IA, though it isnt necesarrily flexible.

Theoretically if you created css styles using the same naming as the other styles (`.psc-MyStyleClass` I think?), then you could put a binding on the table style classes property to change your style, potentially changing the content displayed here? But I didn’t go that far, so I’m not sure if there’s a limitation somewhere in that.

If you include the following in some custom CSS in a theme, it will actually remove the original warning and replace it with whatever you like. In this case I just hosted an svg using web dev so that I knew my server could access it, but really this could come from anywhere.

```auto
.ia_table __body__ emptyMessage {
        visibility: hidden;
        position: relative;
}

.ia_table __body__ emptyMessage:after {
        visibility: visible;
        content: "Put a message here!";
        position: relative;
        height: 10%;
        top: 0;
        width:100%;
        text-align: center;
}

.ia_table __body__ emptyMessage:before {
        visibility: visible;
        content: url("https://fakeURL.com/image.svg");
        position: relative;
        width: 50%
        top: 10%;
        left: 25%;
}

.ia_table__head:after {
        visibility: visible;
        content: "Theoretically you could put something here instead, since the column names dissappear";
        text-align: center;
}

```

It definitely could use some polishing if someone was to actual use it, but hey it works 🤷‍♂️

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

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [October 6, 2020, 3:02pm UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507/10 "2020-10-06T15:02:23Z")

</div>

The lack of headers is actually most important in my opinion.

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [October 6, 2020, 5:30pm UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507/11 "2020-10-06T17:30:27Z")

</div>

This isn’t perfect but to fix the column header issue you can just add a blank row to the table, to hide that it’s there you can also disable rowSelection and set the highlight to be turned off

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [October 6, 2020, 5:43pm UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507/12 "2020-10-06T17:43:47Z")

</div>

What I don’t get is that if you look at the binding it shows the dataset with all of the columns, just no rows.  
Why can’t they show that, like they did in Vision? I understand the differences between Perspective and Vision, but not in this example.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 3, 2021, 2:35pm UTC](https://forum.inductiveautomation.com/t/feature-16500-perspective-table-customize-empty-data-source/26507/13 "2021-11-03T14:35:48Z")

</div>

Split this topic on November 3, 2021, 2:35pm UTC

A post was split to a new topic: [Perspective table empty display customization](https://forum.inductiveautomation.com/t/perspective-table-empty-display-customization/52669)
