Page 1 of 1
Display screen format without RPG
Posted: Fri May 27, 2016 1:25 pm
by pjshuey
Is there a way to display a screen format based on an event such as onclick without passing control back to the RPG? I am trying to add a button to my main screen to take a picture and have it automatically bring up my "camera" screen format without changing the RPG code.
Re: Display screen format without RPG
Posted: Sun May 29, 2016 1:04 am
by Scott Klement
The pui.show() API can be used to display/control a format from JavaScript. Not sure that I understand your situation, however... it's possible that what you're asking for doesn't make sense.
Remember, your RPG program is working with a record format, and has requested input from that format. This has caused the Open Access handler to fire, and it has done some work to prepare and and wait for that format. You want to suddenly change which format is on the display without sending control back to it? I have no idea what that'll do...
What's the advantage of switching to another format? Why not have data from the same format that's hidden and pops up when the camera is selected? There's no limit to how much stuff can be in one format.
Or, why not send the control back to RPG so it can switch screens? This would make things much easier, and isn't difficult to code.