Page 1 of 1

Window Clears input fields

Posted: Mon Feb 01, 2021 9:49 pm
by JayGoo83
I have a details page that has a bunch of inputs/dropdowns. About halfway through the page I have a dropdown that opens a new window. I am doing this because i need a dropdown with checkboxes to allow multi-select. So the new window is a panel that contains a grid with 2 columns: a checkbox and a description. This all works as i wanted to. The issue is that when i open the window for this grid, the screen clears all the inputs on the details page. This is a problem as there is no way to tell the user to select this dropdown first. Is there some other way to approach this or something i can do within this current method? I tried using "assume", which i found on this message board, but maybe I need a combo between the main form and the popup?

So the flow is:
exfmt display.details
enter inputs
btn.click => does code that builds subfile, exfmt display.popup.
fields gone in details

Thanks in advance

Re: Window Clears input fields

Posted: Mon Feb 01, 2021 10:19 pm
by Scott Klement
Normally, when you do EXFMT, it completely wipes out the entire screen and redraws it. You may be thinking that the window just appears on top of what was already there -- but, that's not true. The open access handler remembers the last screen you sent, and re-sends it so the underlying screen is redrawn, then the window is drawn on top of it.

However, unless you've rewritten the previous screen, it will have the values it had the last time you did EXFMT.

To fix this, you would need to do a WRITE on the main screen to update its values, followed by EXFMT on the window format to draw the box that appears above it. (Also... you'll have to make sure the button submitted the values from the screen back to the program... but this is the default unless you've changed the 'bypass validation' property.)

There's also second option... you could use the new-ish "animated screen" and "animation" properties. I must admit that I haven't had a chance to learn how to use these or play with them, but they may also be an option. With these properties, it should be possible to draw your window without wiping out the underlying screen.

Re: Window Clears input fields

Posted: Tue Feb 02, 2021 12:25 pm
by JayGoo83
Thanks Scott. That worked perfectly. I went with the WRITE method you provided. I'll play around with animation stuff another time when I have a little more bandwidth.