# Integration Toolkit Solutions Wiki

**URL:** <https://forum.inductiveautomation.com/t/integration-toolkit-solutions-wiki/105080>\
**Category:** 3rd Party Modules\
**Tags:** scripting, ignition81\
**Created:** [April 14, 2025, 9:02pm UTC](https://forum.inductiveautomation.com/t/integration-toolkit-solutions-wiki/105080 "2025-04-14T21:02:36Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [April 16, 2025, 9:13pm UTC](https://forum.inductiveautomation.com/t/integration-toolkit-solutions-wiki/105080/7 "2025-04-16T21:13:21Z")

</div>

## Add Conditional Styling to Perspective Table Data Rows

Add conditional styling, such as font color, background color, etc. based on a cell value

> **Conditional Row Background Color**
>
> ```python
> forEach(
> {this.custom.data},
> asMap(
> 'value', it(), // use asMap(it()) for dataset sources
> 'style', asMap('backgroundColor', if(it()['population'] > 1000000, 'red', ''))
> )
> )
> 
> ```

> **Features employed**
>
> - [forEach()](https://www.automation-pros.com/toolkit/doc/iteration.html#foreach) Loops through each row..
> - [asMap()](https://www.automation-pros.com/toolkit/doc/iteration.html#asmap) Creates a map of the list of key-value pairs.
> - [it()['columnName']](https://www.automation-pros.com/toolkit/doc/iteration.html#it) Delivers a cell value based on the column name.

Note that for dataset sources, each row needs to use `asMap()` for the `value` key (see expression comments).

---

_[View the full topic](https://forum.inductiveautomation.com/t/integration-toolkit-solutions-wiki/105080)._
