# Perspective Table : How to change cell's background color based on cell's value

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-how-to-change-cells-background-color-based-on-cells-value/37900>\
**Category:** Ignition\
**Tags:** perspective, ignition80\
**Created:** [August 19, 2020, 9:55am UTC](https://forum.inductiveautomation.com/t/perspective-table-how-to-change-cells-background-color-based-on-cells-value/37900 "2020-08-19T09:55:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [August 19, 2020, 9:55am UTC](https://forum.inductiveautomation.com/t/perspective-table-how-to-change-cells-background-color-based-on-cells-value/37900/1 "2020-08-19T09:55:37Z")

</div>

**Ignition 8.0.16-RC1**

With the Perspective Table, I would like to change the cell’s background color based on cell’s value.  
(As a side note, the property data of the table component is binded to a dataset).

(I try to have the same result as with the Vision’s power table configureCell Extension Functions).

Style Rule with element State seem not to be applied to the table’s cells.  
Any idea to achieve this ?

---

<div class="post-metadata">

**Author:** ![denis.bartz](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@denis.bartz](https://forum.inductiveautomation.com/u/denis.bartz)\
**Post date:** [August 19, 2020, 2:49pm UTC](https://forum.inductiveautomation.com/t/perspective-table-how-to-change-cells-background-color-based-on-cells-value/37900/2 "2020-08-19T14:49:56Z")

</div>

You could create another view, just with a label and with the parameters “rowData” coming from the table.  
Bind the label text and background to “rowData” and make your Transforms.

In the table view, add a new column to the parameter “column” and change the “render” to “view”.  
Select the “path” to your previous label view.

 ![table_parameters](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/9/a9c35f0dd62610728e5d4cd52a0ff5014101b014.jpeg)

Passing this parameter “rowData” to a view is an powerful way to change a table.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [August 19, 2020, 2:56pm UTC](https://forum.inductiveautomation.com/t/perspective-table-how-to-change-cells-background-color-based-on-cells-value/37900/3 "2020-08-19T14:56:14Z")

</div>

Thanks, I had seen this render mode, but I hoped there was something more straightforward to only change the background cell color.

---

<div class="post-metadata">

**Author:** ![dhiraj.pawar](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiraj.pawar](https://forum.inductiveautomation.com/u/dhiraj.pawar)\
**Post date:** [September 5, 2022, 5:34pm UTC](https://forum.inductiveautomation.com/t/perspective-table-how-to-change-cells-background-color-based-on-cells-value/37900/4 "2022-09-05T17:34:00Z")

</div>

Hello, Can you elaborate the solution in detail.

---

<div class="post-metadata">

**Author:** ![Derick\_Lawrie](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Derick\_Lawrie](https://forum.inductiveautomation.com/u/Derick_Lawrie)\
**Post date:** [July 10, 2023, 7:00pm UTC](https://forum.inductiveautomation.com/t/perspective-table-how-to-change-cells-background-color-based-on-cells-value/37900/5 "2023-07-10T19:00:46Z")

</div>

I am investigating this same idea while transferring a project from vision to perspective...

Anyone have a solution that can mimic the extension functions from table in vision to table in perspective?

Thanks
