# Row color change in power table

**URL:** <https://forum.inductiveautomation.com/t/row-color-change-in-power-table/73902>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [May 18, 2023, 2:39pm UTC](https://forum.inductiveautomation.com/t/row-color-change-in-power-table/73902 "2023-05-18T14:39:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasath.t](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@prasath.t](https://forum.inductiveautomation.com/u/prasath.t)\
**Post date:** [May 18, 2023, 2:39pm UTC](https://forum.inductiveautomation.com/t/row-color-change-in-power-table/73902/1 "2023-05-18T14:39:01Z")

</div>

Hi ,

I am trying to update each row based one column value.  
my code

```auto
	if colIndex == 0:
		if "Communication" in value:
			 	return {'background': 'red'}
		else:
			return {'background': 'yellow'}

```

output

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

i want to update same color in second column also

please help me out

---

<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:** [May 18, 2023, 2:52pm UTC](https://forum.inductiveautomation.com/t/row-color-change-in-power-table/73902/2 "2023-05-18T14:52:07Z")

</div>

Try this

```auto
if "Communication" in self.data.getValueAt(rowIndex,0):
	return {'background': 'red'}
else:
	return {'background': 'yellow'}
```
