PowerTable onCellEdited script isnt updating the sql database

# Example
    #self.data = system.dataset.setValue(self.data, rowIndex, colIndex, newValue)
    ndx = self.data.getValueAt(rowIndex, 'Formula')
    
    query = "UPDATE BL1Formulas SET %s = ? WHERE Formula = ?" % (colName)
    
    system.db.runPrepUpdate(BL1Formulas, [value,ndx],'Kens_OT')
    
    system.db.refresh(self.data)

First step is to debug the query itself and check the gateway for error messages. Print the query, the args, and their types.

# use system.perspective.print() instead of print() if using perspective.
print query
print 'value:{}, type:{}'.format(value,type(value))
print 'ndx:{}, type:{}'.format(ndx,type(ndx))
1 Like

That should probably be

Value isn’t a valid pointer in onCellEdited

3 Likes