I have a a windows that product information is entered by operators. I have a transaction group for the tags in the window that is triggered by a submit button tied to a submit tag in this group.All fields must be populated to enable the submit button.I tried to add a script to the submit button that would clear the fields by placing " " in the string fields and 0 in the numeric fields when the button is pressed. My problem is that half of the time everything works perfectly, the tags are written to the database then the fields are cleared. Other times the fields are cleared before the transaction group is inserted into the database. Is there a way that i can ad a delay to the script clearing the fields to allow time for the transaction group to process? i have this broken into 2 separate buttons to work around this for the interim but would like to recombine these to limit the possibility of multiple submit entry’s.
if it will help this is the script used:
event.source.parent.parent.getComponent('ActionData').getComponent('drumPart').text= ""
event.source.parent.parent.getComponent('ActionData').getComponent('drumLot').text= ""
event.source.parent.parent.getComponent('ActionData').getComponent('gross').doubleValue=0
event.source.parent.parent.getComponent('ActionData').getComponent('backWt').doubleValue=0