# Changing the background color of a cell in a table

**URL:** <https://forum.inductiveautomation.com/t/changing-the-background-color-of-a-cell-in-a-table/35778>\
**Category:** Ignition\
**Created:** [June 17, 2020, 10:28pm UTC](https://forum.inductiveautomation.com/t/changing-the-background-color-of-a-cell-in-a-table/35778 "2020-06-17T22:28:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Icom](https://avatars.discourse-cdn.com/v4/letter/i/e68b1a/32.png) [@Icom](https://forum.inductiveautomation.com/u/Icom)\
**Post date:** [June 17, 2020, 10:28pm UTC](https://forum.inductiveautomation.com/t/changing-the-background-color-of-a-cell-in-a-table/35778/1 "2020-06-17T22:28:05Z")

</div>

I need to change the color of a cell in a powertable. The color will depend on the selection of a value in a popup. The selected value is stored in a database. Could someone give me a clue on how to do this work? You should first write the value in database and then verify if it is true?. It is that you should check if the validation button in the popup has been clicked?. Any hint or reference that you can give me? Thank you

---

<div class="post-metadata">

**Author:** ![c.bertulli](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@c.bertulli](https://forum.inductiveautomation.com/u/c.bertulli)\
**Post date:** [June 18, 2020, 6:29am UTC](https://forum.inductiveautomation.com/t/changing-the-background-color-of-a-cell-in-a-table/35778/2 "2020-06-18T06:29:45Z")

</div>

You have to “play” with the Row Index and the Column Index ( like a naval battle ).  
So basically, you have to find a way to know the Row Index and the Column Index of your value inside the Power Table and put them in a script like this one:  
( **configureCell** - Extension Functions )

```auto
	if rowView == 7 and colView == 2:
		return {'background': '204,204,255'}

```

---

<div class="post-metadata">

**Author:** ![Icom](https://avatars.discourse-cdn.com/v4/letter/i/e68b1a/32.png) [@Icom](https://forum.inductiveautomation.com/u/Icom)\
**Post date:** [June 18, 2020, 3:37pm UTC](https://forum.inductiveautomation.com/t/changing-the-background-color-of-a-cell-in-a-table/35778/3 "2020-06-18T15:37:05Z")

</div>

Hi,  
Thanks for you reponse, works as expected.

Thanks again
