newValue = event.newValue
oldValue = event.oldValue
row = event.row
column = event.column
if(newValue == "pre" or newValue == "post"):
fpmi.db.runPrepStmt("UPDATE tblMaltDataSNB SET TestType = ? WHERE MALTSNBID = ?",[newValue, intMALTSNBID])
else:
dictTestType = {"TestType":oldValue}
fpmi.dataset.updateRow(event.source.data, row, dictTestType)
fpmi.gui.warningBox('The test type can only be "pre" or "post".')
I have this code on the cellEdited event of a table. I would like the cell of the dataset to revert back to the old value if the new value is not equal to the strings “pre” or “post”
I do not receive any errors when this code fires, but the cell of the dataset does not revert back either.