Can you simulate a "WRITE" of a display record format?

Use this board to ask questions or have discussions with other Genie users.
Post Reply
sruthfor
New User
Posts: 1
Joined: Thu Jun 15, 2017 4:46 pm
First Name: Scott
Last Name: Ruthford
Company Name: Prime Therapeutics
Contact:

Can you simulate a "WRITE" of a display record format?

Post by sruthfor »

Our users have discovered that an informational "Splash" green screen is not showing up in Genie. It is a record format that is output via an RPG "WRITE" of the format. It's used to give the user feedback while a long running underlying processing is occurring. It will disappear when the underlying record format is displayed via EXFMT. I contacted support and they said it is impossible for Genie to detect anything other than an EXFMT, which I suspected, but is there a Genie customization with a javascript workaround you could think of to temporarily display a panel or something while the display is input inhibited?
SeanTyree
Profound User
Posts: 76
Joined: Fri Jan 11, 2013 6:11 pm
First Name: Sean
Last Name: Tyree
Company Name: US HealthWorks
State / Province: California
Zip / Postal Code: 91355
Country: United States
Contact:

Re: Can you simulate a "WRITE" of a display record format?

Post by SeanTyree »

I have done this using the following approach.

On your "Splash" screen put a pui.click(); in the onload event.

When you EXFMT the splash screen it will display during the initial load of the data for the main screen.

Sean
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Can you simulate a "WRITE" of a display record format?

Post by Scott Klement »

You can't do just a WRITE, because that's now how web applications work ;-) It's not possible for a web server to just arbitrarily send a screen to a web browser... it can only send a screen/page when the user requests it. (Imagine if any web server on the internet could pop-up a page in your browser without you asking... it'd be a mess!)

What you can do, as Sean quite correctly points out, is that you can write a display that would normally accept some input (or, at least, a press of the enter key) to the screen, and you can have JavaScript code that immediately submits the screen. (In that case, the JavaScript code does the work of pressing Enter for the user.)

In a Rich Display, you'd do that with pui.click(), like Sean said.

In a 5250 display, you'd use pressKey('ENTER').

You can do it in the onload event if you want it to happen immediately, or if you want to add a little bit of delay, you can run either pui.click() or pressKey with the JavaScript setTimeout API.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests