Power Table removing value once entered

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.

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:

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

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

Thank you.

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


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

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

1 Like

1 Like

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.

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.

1 Like

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!

1 Like

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