I created a record format in my UI to display a splash screen prior to running a long process that pulls data from our Salesforce org. I use the javascript example that is on the ProfoundUI doc website and other forum posts to set a timer in the onLoad event and clear it in the onSubmit event. The auto-submit process does not work the first time I click on the button that initiates the data pull but it does auto-submit every time after that first time.
I've included screen captures and the UI JSON as an attachment.
How can I get it to work the first time the process is initiated?
Is it possible that part of the Profound UI application is still communicating with the server in the background?
If you try to submit the screen when it hasn't finished loading, or is still finishing up its communication with the IBM i to draw the screen, then it will ignore the screen submission... expecting that you'll try again later. That's what comes to mind when reading about your dilemna.
Have you tried increasing the time on the timeout? Or, making a simpler screen?
It looks like there are some mistakes in your JavaScript code that could be causing the problem you're experiencing. Please edit your onload event to use the following:
Hi, I have checked your display file and it looks like you have set the "external javascript" property of your Splash screen to a CSS URL which supposedly should be a Javascript file.
splash.PNG (11.34 KiB) Viewed 5485 times
Could you remove that and try running the program again? I was able to make it work in my test environment with your Splash screen by simply removing that.
If you need to add more than one external CSS files, you could do a right-click on the "external css" property and the "Add Another External CSS" option will allow you to include additional external CSS files.
add external css.PNG (14.65 KiB) Viewed 5485 times
That sort of fixed it. It works great if I display the splash screen from the "main" page and return to the main page.
It does not work correctly when:
1. I display the splash screen and then display a secondary popup window. It doesn't seem to be turning the timer off because the second popup window is repeatedly submitted back to the server.
2. The splash screen does not appear at all if I try to display the if from a secondary popup window.