Notifications
Clear all
Topic starter
I have a form that needs to load OBSPREV information on form open if there is anything there, but to not load anything if the OBSPREV value is "_", and I need this to run just once when the form loads without it running each time the option is changed on the form.
It keeps running again and overwriting the new value with the _ when I want it to leave it blank.
Is there a way to have it run just when the form is opened that one time?
Posted : May 23, 2023 5:55 am
If you are loading it into the same obs term using OBSNOW, then try this:
{! if OBSPREV("OBSTERM") <> "_" and OBSPREV("OBSTERM") <> "" and OBSNOW("OBSTERM") == "" then
OBSNOW("OBSTERM",OBSPREV("OBSTERM"))
else
""
endif
That 3rd test in the IF will keep it from overwriting anything entered when it comes off Hold.
Posted : May 23, 2023 10:53 am