# Animated (blinking) row background in Power Table

**URL:** <https://forum.inductiveautomation.com/t/animated-blinking-row-background-in-power-table/70348>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [February 27, 2023, 9:28am UTC](https://forum.inductiveautomation.com/t/animated-blinking-row-background-in-power-table/70348 "2023-02-27T09:28:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimitris\_Katsaros](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@Dimitris\_Katsaros](https://forum.inductiveautomation.com/u/Dimitris_Katsaros)\
**Post date:** [February 27, 2023, 9:28am UTC](https://forum.inductiveautomation.com/t/animated-blinking-row-background-in-power-table/70348/1 "2023-02-27T09:28:57Z")

</div>

Hello, I'm trying to create a blinking background for rows in Vision Power Table. Can anyone help me on how something like that would be implemented?

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [February 27, 2023, 2:09pm UTC](https://forum.inductiveautomation.com/t/animated-blinking-row-background-in-power-table/70348/2 "2023-02-27T14:09:19Z")

</div>

You will need to create a tag that is connected to a timer component for your blinking rate. This could be on the gateway, client, or in the PLC. Then use scripting to color each row in your table and use the blink tag to determine which color it should be (i.e. "alarm" for row is true, if(blink, red, white) ).

> [@POWER TABLE background color of row](https://forum.inductiveautomation.com/t/power-table-background-color-of-row/21178):
>
> Hello to everybody, I need help to set the background colour of rows of a power table object, based on the value of a specified coloumn. I.e. if the value of the second coloumn of my power table is 1 I need to set the background colour of that row red, if the value is 10 the corrispondent row shoud be green. Thank you in advance Best regards Claudio

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [March 1, 2023, 4:18am UTC](https://forum.inductiveautomation.com/t/animated-blinking-row-background-in-power-table/70348/3 "2023-03-01T04:18:51Z")

</div>

I don't believe that this could be done reliably with the configureCell extension function alone since it doesn't fire unless triggered by some event that would require the cells to be painted, but from my experience working with tables, I can imagine quite a few approaches that would probably work.

Just taking a quick look at the problem, I was able to get the effect you are looking for with the following procedure:  
• Add a custom _Boolean_ propery to the power table called 'blink'  
• Add a timer component to the window  
• Add the following script to the timer component's action performed event handler:

```auto
powerTable = event.source.parent.getComponent('Power Table') #Change this path to match your project
if powerTable.blink:
	powerTable.blink = False
else:
	powerTable.blink = True
powerTable.table.getModel().fireTableDataChanged() #This line can be anything that will trigger a repaint

```

• Finally, script the configureCell extension function as needed. In my test project, I used the following:

```auto
#def configureCell([...]):
	if selected:
		return {'background': self.selectionBackground}
	elif self.blink:
		return {'background': 'white'}
	else:
		return {'background': '#DDDDDD'}

```

**Here is the result:**

[https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/a/5a16a220c32b4afd6bf9e8d25bfab7b73da0596d.mp4](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/a/5a16a220c32b4afd6bf9e8d25bfab7b73da0596d.mp4)

---

<div class="post-metadata">

**Author:** ![Dimitris\_Katsaros](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@Dimitris\_Katsaros](https://forum.inductiveautomation.com/u/Dimitris_Katsaros)\
**Post date:** [March 1, 2023, 10:13am UTC](https://forum.inductiveautomation.com/t/animated-blinking-row-background-in-power-table/70348/6 "2023-03-01T10:13:45Z")

</div>

Thanks, both of you!
