# What triggers configureCell on a powertable?

**URL:** <https://forum.inductiveautomation.com/t/what-triggers-configurecell-on-a-powertable/63454>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [August 25, 2022, 2:11pm UTC](https://forum.inductiveautomation.com/t/what-triggers-configurecell-on-a-powertable/63454 "2022-08-25T14:11:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [August 25, 2022, 2:11pm UTC](https://forum.inductiveautomation.com/t/what-triggers-configurecell-on-a-powertable/63454/1 "2022-08-25T14:11:33Z")

</div>

I have a table that lists out a sequence of steps the PLC is going through. I want to highlight the current step that is being run and to grey out the previous steps and right now I have a custom property on my table that is bound to the PLC tag that says what step it is on like this

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/7/179e771ab0f2deb8669fc2add8837fa6093ec372.png)

and in my configureCell I have the following script -

```auto
	try:
		curStep = self.currentSequenceStep - 1
		if rowIndex < curStep:
			return {'background':'grey'}
		elif rowIndex == curStep:
			return {'background':'green'}
		else:
			return {'background':'white'}
	except TypeError:
		# Occurs sometimes on initial loading before tag is found so this is just to
		# keep the console from getting flooded with useless errors
		pass

```

It would be nice IMO if the extension function documentation

```auto
Provides a chance to configure the contents of each cell. Return a
	dictionary of name-value pairs with the desired attributes. Available
	attributes include: 'background', 'border', 'font', 'foreground',
	'horizontalAlignment', 'iconPath', 'text', 'toolTipText',
	'verticalAlignment'

```

said what it was that made it trigger and run this. I know a data property change seems to consistently trigger it but not sure what else.

The behavior I am experiencing now is that the step will increment, but the table does not seem to reflect the changes until the user clicks on the table and then it is up to date (and even then sometimes it requires multiple clicks for some reason).

I am wondering if there is a different way to set this up, of if there’s a way I can leverage a prop change on my custom property that would be like

```auto
if event.propertyName == 'currentSequenceStep':
    # Tell table to configureCells again

```

I am using 8.1.3 if that matters.

---

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [August 25, 2022, 2:18pm UTC](https://forum.inductiveautomation.com/t/what-triggers-configurecell-on-a-powertable/63454/2 "2022-08-25T14:18:43Z")

</div>

I would add a hidden column to the table `data` property called something like `activeStep`

Then in your property change event set the appropriate rows `activeStep` to True (and the previous to False)

Then it should force `configureCell` to fire. I don’t know of any other way to force it other than updating the `data` on the table (or trying to interacting with it)

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [August 25, 2022, 2:24pm UTC](https://forum.inductiveautomation.com/t/what-triggers-configurecell-on-a-powertable/63454/3 "2022-08-25T14:24:31Z")

</div>

I was trying to avoid this as I use the underlying dataset every all over in scripting and adding a essentially a dummy column just for visualization is going mess with some other scripts I think. If there is no other reliable way then I will do that, that was my first idea, but I was hoping there would be a different way. Maybe with some java magic.

---

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [August 25, 2022, 2:27pm UTC](https://forum.inductiveautomation.com/t/what-triggers-configurecell-on-a-powertable/63454/4 "2022-08-25T14:27:30Z")

</div>

I totally understand! I always end up with a bunch of hidden columns in my dataset just to force `configureCell` updates so hopefully there is another way to make it trigger again

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [August 25, 2022, 2:39pm UTC](https://forum.inductiveautomation.com/t/what-triggers-configurecell-on-a-powertable/63454/5 "2022-08-25T14:39:03Z")

</div>

Ok so luckily the way I work with this table is I have a root container custom property that has the complete raw dataset that I make look pretty and then assign to the table like this

```auto
if event.propertyName == "sequenceStepData":
	destinationDS = system.dataset.toDataSet(["Step Number", "Step Type", "Params"], [])
	# Chance to proceess new data and make viewable for table
	ds = system.dataset.toPyDataSet(event.newValue)
	for (col1, ..., colN) in ds:
            # Make desintationDS look pretty for the table
	event.source.getComponent('Table_Sequence').data = destinationDS

```

All I did was add another custom property called reconfigureCells on the root container. Then I changed my script to look like

```auto
if event.propertyName == "sequenceStepData" or event.propertyName == "reconfigureCells":
	destinationDS = system.dataset.toDataSet(["Step Number", "Step Type", "Params"], [])
	# Chance to proceess new data and make viewable for table
    if event.propertyName == "sequenceStepData":
        ds = system.dataset.toPyDataSet(event.newValue)
    else:
        ds = system.dataset.toPyDataSet(event.source.sequenceStepData)
	for (col1, ..., colN) in ds:
        # Make desintationDS look pretty for the table
	event.source.getComponent('Table_Sequence').data = destinationDS

```

And then on my table as a proeprtyChange I have

```auto
if event.propertyName == 'currentSequenceStep':
	event.source.parent.reconfigureCells=True
	event.source.parent.reconfigureCells=False

```

So now every time the step counter increments, the table tells triggers the root container property to redo the script that makes the raw dataset presentable whether or not the data changed and then sets it to the table. At that point I think the Ignition table sees a new dataset assigned and reruns configure cells regardless of the fact that I am assigning an identical dataset to the .data property. This works nicely!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 25, 2022, 3:32pm UTC](https://forum.inductiveautomation.com/t/what-triggers-configurecell-on-a-powertable/63454/6 "2022-08-25T15:32:16Z")

</div>

I would expect something like this to work:

```python

from org.apache.commons.lang3.reflect import FieldUtils

model = FieldUtils.readField(powerTableReference, "model", True)
model.fireTableDataChanged()

```

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [August 25, 2022, 3:33pm UTC](https://forum.inductiveautomation.com/t/what-triggers-configurecell-on-a-powertable/63454/7 "2022-08-25T15:33:26Z")

</div>

There’s that java magic I was hoping for. I will try it this way and see how it goes.

Edit: Works perfectly. Now my root container property change remains in the original state to only modify the data instead of running for two different scenarios which I appreciate and my table property change is able to directly trigger it like

```auto
if event.propertyName == 'currentSequenceStep':
    # This tells the configureCell extension function to run again
	from org.apache.commons.lang3.reflect import FieldUtils
	model = FieldUtils.readField(event.source, "model", True)
	model.fireTableDataChanged()

```

---

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [August 25, 2022, 4:12pm UTC](https://forum.inductiveautomation.com/t/what-triggers-configurecell-on-a-powertable/63454/8 "2022-08-25T16:12:58Z")

</div>

This is awesome! Thank you Paul 😃

---

<div class="post-metadata">

**Author:** ![Anees\_Omar](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@Anees\_Omar](https://forum.inductiveautomation.com/u/Anees_Omar)\
**Post date:** [August 1, 2024, 8:45am UTC](https://forum.inductiveautomation.com/t/what-triggers-configurecell-on-a-powertable/63454/9 "2024-08-01T08:45:20Z")

</div>

Thanks! This is a great solution

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [July 27, 2026, 6:07pm UTC](https://forum.inductiveautomation.com/t/what-triggers-configurecell-on-a-powertable/63454/10 "2026-07-27T18:07:53Z")

</div>

Reviving my own old thread - is there a way to do this for a regular non-power table?

I have a 8.1 vision project, regular table, custom property that has is an int. The selectedRow is bound to this. I will see the data as if the row is selected but the row isn't actually highlighted. I suspect refiring a prop change similar to this would work but the script does not work for a regular table. Is this possible?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 27, 2026, 6:25pm UTC](https://forum.inductiveautomation.com/t/what-triggers-configurecell-on-a-powertable/63454/11 "2026-07-27T18:25:01Z")

</div>

`referenceToTable.repaint()`?
