# Blinking Table's cell

**URL:** <https://forum.inductiveautomation.com/t/blinking-tables-cell/20937>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [November 19, 2018, 1:58pm UTC](https://forum.inductiveautomation.com/t/blinking-tables-cell/20937 "2018-11-19T13:58:42Z")\
**Posts on this page:** 7\
**Page:** 1

<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:** [November 19, 2018, 1:58pm UTC](https://forum.inductiveautomation.com/t/blinking-tables-cell/20937/1 "2018-11-19T13:58:42Z")

</div>

Hi All,

I was wondering if there is a way to make a specific Power Table’s cell blink from let’s say… yellow to red with a blink time of 1 second.

Thanks in advance.  
Cheers,

---

<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:** [November 19, 2018, 6:29pm UTC](https://forum.inductiveautomation.com/t/blinking-tables-cell/20937/2 "2018-11-19T18:29:13Z")

</div>

This was written by @JGJohnson in another post. This should be placed in the configureCell function of the power table. This should help point you in the right direction on what you need to do.

```auto
attributes = {"background": "#FFFFFF", "foreground": "#000000"}
    if rowIndex % 2 == 0:
        attributes["background"] = "#EEECE8"
	if colName == "val":
		if self.data.getValueAt(rowIndex, "writeable") == True:
			attributes["background"] = "#FFFF47"
	if colName == "alarm" and value is not None:
		attributes["text"] = None
	elif colName == "unit" and value is None:
		attributes["text"] = None
		if self.data.getValueAt(rowIndex, "alarm") is not None:
			attributes["iconPath"] = "CustomIcons/Indicator_Red.png"
			if value &lt; 1:
				attributes["iconPath"] = "CustomIcons/Indicator_Green.png"

	return attributes
```

---

<div class="post-metadata">

**Author:** ![kaushik.shah](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kaushik.shah](https://forum.inductiveautomation.com/u/kaushik.shah)\
**Post date:** [September 21, 2021, 5:16pm UTC](https://forum.inductiveautomation.com/t/blinking-tables-cell/20937/3 "2021-09-21T17:16:55Z")

</div>

> [@c.bertulli](#):
>
> ith a blink time of 1 second.

Has anyone tried something similar ? Can't understand the condition `if value &lt; 1:`

trying to achieve a blinking cell where the dataset it coming from sql and only one cell value is live from OPC.

@JGJohnson , can help ?

---

<div class="post-metadata">

**Author:** ![JGJohnson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jgjohnson/32/29582_2.png) [@JGJohnson](https://forum.inductiveautomation.com/u/JGJohnson)\
**Post date:** [September 21, 2021, 6:04pm UTC](https://forum.inductiveautomation.com/t/blinking-tables-cell/20937/4 "2021-09-21T18:04:51Z")

</div>

> [@kaushik.shah](#):
>
> Can’t understand the condition `if value &lt; 1:`

It got messed up when dkhayes copied it. The line is actually

```auto
if value < 1:

```

As for blinking a cell, my first thought would be to add a couple of extra hidden columns to the dataset, so the data might look something like this:

```auto
MyCol, MyColBlinks, MyColBlinkState
value, True, 0

```

Then use a timer with a 1 second interval to update the dataset and toggle the blink state for any rows where MyColBlinks is set to True.

Then it's a simple matter of coloring the cell in the configureCell extension function according to whether or not the cell should blink and what it's blink state is.

```auto
if colName == "MyCol":
    if self.data.getValueAt(rowIndex, "MuColBlinks":
        if self.data.getValueAt(rowIndex, "MuColBlinkState":
            attributes["background"] = "#FF0000":
        else:
            attributes["background"] = "#FFFFFF"      

```

---

<div class="post-metadata">

**Author:** ![kaushik.shah](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kaushik.shah](https://forum.inductiveautomation.com/u/kaushik.shah)\
**Post date:** [September 21, 2021, 6:30pm UTC](https://forum.inductiveautomation.com/t/blinking-tables-cell/20937/5 "2021-09-21T18:30:41Z")

</div>

> [@JGJohnson](#):
>
> o

Yes, great to know that I am on the correct path. Doing something similar.

---

<div class="post-metadata">

**Author:** ![kaushik.shah](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kaushik.shah](https://forum.inductiveautomation.com/u/kaushik.shah)\
**Post date:** [September 21, 2021, 7:07pm UTC](https://forum.inductiveautomation.com/t/blinking-tables-cell/20937/6 "2021-09-21T19:07:16Z")

</div>

> [@JGJohnson](#):
>
> dataset

Just created couple of custom properties and using the value from there as below,

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

---

<div class="post-metadata">

**Author:** ![yudan.zhang.1](https://avatars.discourse-cdn.com/v4/letter/y/cc9497/32.png) [@yudan.zhang.1](https://forum.inductiveautomation.com/u/yudan.zhang.1)\
**Post date:** [January 27, 2022, 4:35pm UTC](https://forum.inductiveautomation.com/t/blinking-tables-cell/20937/7 "2022-01-27T16:35:45Z")

</div>

Finally I found a really easy way to make a row blink:

1. Put this function in project script, dont forget to **import time** on top of your project script  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/c/2c6732ef0124827abe71bc9ee6de7cc06ba96a88.png)
2. In configureCell function of a Power table, run this script: **return Utilities.colorDelay2()**

You got your row blinking with a interval of 1 second 😉
