# Row color change in a table when the data value is dataset

**URL:** <https://forum.inductiveautomation.com/t/row-color-change-in-a-table-when-the-data-value-is-dataset/52627>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [November 2, 2021, 3:08pm UTC](https://forum.inductiveautomation.com/t/row-color-change-in-a-table-when-the-data-value-is-dataset/52627 "2021-11-02T15:08:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjohnson0238](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@mjohnson0238](https://forum.inductiveautomation.com/u/mjohnson0238)\
**Post date:** [November 2, 2021, 3:08pm UTC](https://forum.inductiveautomation.com/t/row-color-change-in-a-table-when-the-data-value-is-dataset/52627/1 "2021-11-02T15:08:38Z")

</div>

Good day, Im needing help in chaginging this tables row color based off the “Duration”  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/2/02cedb145ed6bcd34c2b6b64d2f8751fea45ec4b.png)  
But I am very unsure. Any help will be awesome. Thanks

---

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [November 2, 2021, 4:57pm UTC](https://forum.inductiveautomation.com/t/row-color-change-in-a-table-when-the-data-value-is-dataset/52627/2 "2021-11-02T16:57:11Z")

</div>

What version of Ignition are you on? I know 8.1.11 has new dataset styling properties you can use to simplify this. **EDIT: I take this back - there is no such functionality in 8.1.11.** However, if you’re on an older version, it’s still possible to do this (depending on how your dataset is being returned - dataset or json).

The basic idea is that on your table data binding, add a transform and loop through each row in the dataset and add a style object with a row color. If you want an example of how to do this, drag on a Perspective Table component (the default one) and check how the first cell is styled orange - the process for styling a row would be similar.

In the transform, you would specify what you want to do with the duration (probably style rows based on a range of values - you would do that here).

---

<div class="post-metadata">

**Author:** ![mjohnson0238](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@mjohnson0238](https://forum.inductiveautomation.com/u/mjohnson0238)\
**Post date:** [November 2, 2021, 6:45pm UTC](https://forum.inductiveautomation.com/t/row-color-change-in-a-table-when-the-data-value-is-dataset/52627/3 "2021-11-02T18:45:14Z")

</div>

im using 8.1.0
