# Power Table removing value once entered

**URL:** <https://forum.inductiveautomation.com/t/power-table-removing-value-once-entered/63873>\
**Category:** Ignition\
**Tags:** ignition80, vision\
**Created:** [September 8, 2022, 12:16pm UTC](https://forum.inductiveautomation.com/t/power-table-removing-value-once-entered/63873 "2022-09-08T12:16:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raymond\_Sipes](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@Raymond\_Sipes](https://forum.inductiveautomation.com/u/Raymond_Sipes)\
**Post date:** [September 8, 2022, 12:16pm UTC](https://forum.inductiveautomation.com/t/power-table-removing-value-once-entered/63873/1 "2022-09-08T12:16:57Z")

</div>

Hello all!

I have a power table that should be editable. Although, once I enter a value within a cell in the power table I will press enter and the value will revert to 0. I have 3 other tables that follow the exact flow a s this table, but only this one is giving me issues.

This is the code i have for onCellEdited.

```auto
def onCellEdited(self, rowIndex, colIndex, colName, oldValue, newValue):
		data = self.data
		data = system.dataset.setValue(data, rowIndex, colIndex, newValue)
		difference = data.getValueAt(rowIndex, 'Status') - data.getValueAt(rowIndex, 'Goal')
		data = system.dataset.setValue(data, rowIndex, 'Behind / Ahead', difference)
		self.data = data

```

This is what I have for the configureHeaderStyle:

```auto
def configureHeaderStyle(self, colIndex, colName):
				# Example:
				from javax.swing import SwingConstants
				from java.awt import Color
				config = {'foreground': 'black',
				          'background' : 'lightGray',
						  'horizontalAlignment': SwingConstants.CENTER}
				
				if colName == 'Mold':
					config['background'] = Color(255, 172, 71)
					# config['background'] = 'yellow'
				
				return config

```

This is the table customizer to show I do have it as editable

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

If I need to give anymore information please do let me know!

Thank you.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 8, 2022, 12:31pm UTC](https://forum.inductiveautomation.com/t/power-table-removing-value-once-entered/63873/2 "2022-09-08T12:31:47Z")

</div>

Where is the original data in the table originating from? Database, tag, user entry?

---

<div class="post-metadata">

**Author:** ![Raymond\_Sipes](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@Raymond\_Sipes](https://forum.inductiveautomation.com/u/Raymond_Sipes)\
**Post date:** [September 8, 2022, 12:41pm UTC](https://forum.inductiveautomation.com/t/power-table-removing-value-once-entered/63873/3 "2022-09-08T12:41:10Z")

</div>

It is coming form a dataset, here is the dataset editor!

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

---

<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:** [September 8, 2022, 12:45pm UTC](https://forum.inductiveautomation.com/t/power-table-removing-value-once-entered/63873/4 "2022-09-08T12:45:13Z")

</div>

There is nothing wrong with your code. Make sure you don’t have a binding or something external that is writing to your data.

---

<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:** [September 8, 2022, 12:47pm UTC](https://forum.inductiveautomation.com/t/power-table-removing-value-once-entered/63873/5 "2022-09-08T12:47:09Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/3/83ccbc4cf43e3ec9ee4a50d80981cdf5cf893b39.png)

---

<div class="post-metadata">

**Author:** ![Raymond\_Sipes](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@Raymond\_Sipes](https://forum.inductiveautomation.com/u/Raymond_Sipes)\
**Post date:** [September 8, 2022, 12:49pm UTC](https://forum.inductiveautomation.com/t/power-table-removing-value-once-entered/63873/6 "2022-09-08T12:49:32Z")

</div>

My snipping tool only allowed for partial snipping, but I do not have any bindings for this property. I may have to copy a other power table and re-enter the old data manually.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/d/0d0bf6983f89107c8d978d9dd27009489ba8fa69.png)

---

<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:** [September 8, 2022, 12:52pm UTC](https://forum.inductiveautomation.com/t/power-table-removing-value-once-entered/63873/7 "2022-09-08T12:52:22Z")

</div>

Interesting. On the bright side, it doesn’t look like too daunting of a task for that power table. Just one string column. Try renaming the table, and see if that breaks whatever is overwriting you.

---

<div class="post-metadata">

**Author:** ![Raymond\_Sipes](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@Raymond\_Sipes](https://forum.inductiveautomation.com/u/Raymond_Sipes)\
**Post date:** [September 8, 2022, 12:54pm UTC](https://forum.inductiveautomation.com/t/power-table-removing-value-once-entered/63873/8 "2022-09-08T12:54:11Z")

</div>

Yes luckily this will be a fairly easy fix, just wondered if anyone had experienced this and found a solution. Thank you for troubleshooting with me and have a great day!

---

<div class="post-metadata">

**Author:** ![Raymond\_Sipes](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@Raymond\_Sipes](https://forum.inductiveautomation.com/u/Raymond_Sipes)\
**Post date:** [September 8, 2022, 1:24pm UTC](https://forum.inductiveautomation.com/t/power-table-removing-value-once-entered/63873/9 "2022-09-08T13:24:43Z")

</div>

Solution was to create a new power table and re-enter the dataset manually.
