We have a form that ultimately creates orders after a button press where it runs about 300 lines of code. Normally everything flows fine, however if the form was on hold in its lifetime without many document variable changes afterwards some of the orders do not create while other will. The super strange part is that the document variable that the order is based on is still populated (as verified through a userOK box and what I understand of a MEL trace) right before the Mel_Add_order function:
if (DOCUMENT.TOTAL_KENALOG > 0) then
if (MEL_ADD_ORDER("S","Office Supplies","Kenalog, 40mg/1ml vial","",
kenalogcodes,kenalogdescr,"",str(DOCUMENT.TOTAL_KENALOG * 4))
< 0) then .....
The if statement appears to never kick off after the document is on hold even though DOCUMENT.TOTAL_KENALOG still holds the expected value as displayed using userOK which does still kickoff. Wondering first if this is any kind of known issue or basic thing I'm missing. Can get into more detail if desired. I did go through the post in CHUG | Is there any way to prevent multiple entries of orders even after the document is opened from hold? (centricityusers.com) which was almost opposite of my problem but this is on button press and no watcher variables in play to activate the orders so I don't think my concern is related. Thank you.