# \[Perspective Tables\] Rows Conditional Formatting

**URL:** <https://forum.inductiveautomation.com/t/perspective-tables-rows-conditional-formatting/52284>\
**Category:** Ignition\
**Tags:** ignition81, scripting, perspective\
**Created:** [October 25, 2021, 6:58am UTC](https://forum.inductiveautomation.com/t/perspective-tables-rows-conditional-formatting/52284 "2021-10-25T06:58:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davide3i](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davide3i/32/27811_2.png) [@Davide3i](https://forum.inductiveautomation.com/u/Davide3i)\
**Post date:** [October 25, 2021, 6:58am UTC](https://forum.inductiveautomation.com/t/perspective-tables-rows-conditional-formatting/52284/1 "2021-10-25T06:58:27Z")

</div>

I’m trying to customize the background colour of my table’s rows following the instructions of this topic: [[Feedback] NEW Perspective Table](https://forum.inductiveautomation.com/t/feedback-new-perspective-table/21199/48).

I’ve appended a new style object to every data element through a binding, but the rows still have the original background colour. I also want to pinpoint I’m using a striped style on my table: may this cause an issue with the additional conditional formatting?

 ![table](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/3/b3937a56e90788d1a3f3aa353d112ef8d126a82c.png)

---

<div class="post-metadata">

**Author:** ![JoeF](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JoeF](https://forum.inductiveautomation.com/u/JoeF)\
**Post date:** [October 25, 2021, 6:25pm UTC](https://forum.inductiveautomation.com/t/perspective-tables-rows-conditional-formatting/52284/2 "2021-10-25T18:25:54Z")

</div>

EDIT: To make it a bit easier, you can accomplish this row-wise by nesting all of your row values into an object named “value”, then you can add another object named “style” to add your conditional formatting:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/1/e115f9408f63fbd42aac543bcb93857c08978f2c.png)

The example you have above is equivalent to adding an additional column of data named “style” to the data property.

* * *

Another way:

You can conditionally override the striped row styling, by applying conditional formatting cell-wise (apply to every individual object in a row of data).

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/9/5910a0b300b40c53e5243864308e7b34ac72f375.png)

---

<div class="post-metadata">

**Author:** ![Davide3i](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davide3i/32/27811_2.png) [@Davide3i](https://forum.inductiveautomation.com/u/Davide3i)\
**Post date:** [October 26, 2021, 7:58am UTC](https://forum.inductiveautomation.com/t/perspective-tables-rows-conditional-formatting/52284/3 "2021-10-26T07:58:49Z")

</div>

Thank you for this helpful insight! Now I understand what I was messing up.

---

<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 24, 2021, 8:07pm UTC](https://forum.inductiveautomation.com/t/perspective-tables-rows-conditional-formatting/52284/4 "2021-11-24T20:07:56Z")

</div>

Split this topic on November 24, 2021, 8:07pm UTC

A post was split to a new topic: [Conditional formatting in table](https://forum.inductiveautomation.com/t/conditional-formatting-in-table/53449)

---

<div class="post-metadata">

**Author:** ![jcaudle](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jcaudle](https://forum.inductiveautomation.com/u/jcaudle)\
**Post date:** [December 7, 2021, 9:09pm UTC](https://forum.inductiveautomation.com/t/perspective-tables-rows-conditional-formatting/52284/5 "2021-12-07T21:09:21Z")

</div>

Okay so there is no easy (gui) way to do conditional formatting… yet?

---

<div class="post-metadata">

**Author:** ![JoeF](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JoeF](https://forum.inductiveautomation.com/u/JoeF)\
**Post date:** [December 7, 2021, 9:28pm UTC](https://forum.inductiveautomation.com/t/perspective-tables-rows-conditional-formatting/52284/6 "2021-12-07T21:28:57Z")

</div>

For cell-by-cell conditional formatting in a table, I think this is the preferred way. It is the equivalent to the "configureCell" extension function on a Vision Power Table. Hard to say if there is a better way, depends what your use case is.

> [@Color perspective table cell depending on value in another column](https://forum.inductiveautomation.com/t/color-perspective-table-cell-depending-on-value-in-another-column/21791):
>
> How do I color table cell depending on value in another column?
