I am attempting to scan multiple 10 character long barcodes into a table using the same text field input. A key released event populates the Table. I cannot for the life of me get the text box to clear after a scan of 10 characters or more. I have tried lots of things, such as invoke later and other component bindings etc.
The table updates and the test message ‘clear attempted’ is printed to the console so I know the function is running. It will not clear the text field. Please help, I have tried lots of other methods to no avail.
id= event.source.text
if len(spoolID) >= 10:
def reset():
event.source.text = ""
#print "clear attempted"
#tableData = event.source.parent.getComponent('Table').data
#tableData = system.dataset.addRow(tableData,[id])
#event.source.parent.getComponent('Table').data = tableData
reset()
Ign 8.1.3