January 30, 2007, 05:02 PM
Alan MainPop up alert after Query in .fex
I am executing a simple query in a .fex file that looks like this:
TABLE FILE LERTSAVRPT
PRINT
DST.SVDRPTOPT AS ''
WHERE REPORT_ID = '&strRepKey'
AND NT_ACCOUNT_NM = '&SelUser'
ON TABLE SAVE AS TMSVDRPT FORMAT ALPHA
END
I'd like to add something like this:
-IF &LINES GT 0 THEN
ELSE
which would pop up the typical little grey box with the OK button like the alert statement in javascript does. Are there webFocus statements that can do this inline? If not how can I invoke a little javascript at this point?
My .fex file has a -HTMLFORM section that displays several text boxes and select lists to the user. Within the html are several javascripts already for things like onclick, onchange...can I insert the above javascript there or would it have to be in a location referenced by some sort of jsURL setting?
January 30, 2007, 05:12 PM
susannahthe question is whether or not you want processing to STOP while the user interacts with something...thats a very mainframe concept.
I send myself messages throughout some processes using the
CMD NET SEND mycomputername SOMEMESSAGE TEXT HERE WITH EVEN SOME &VAR CONTENT
and a box pops up and processing continues
but that requires that you know the computername for each of your userids.
Also, we don't know your config, so do please edit your profile and inthe signature box, put your config.
Your computer name? click right on MyComputer on your desktop, click Properties, and the ComputerName tab.
January 30, 2007, 05:24 PM
Alan MainThis application will be used by many users in different locations so addressing individual computer names would not be practical. I guess processing would stop while the user interacts, but that's what happens anyway...the html presents a form to the user, which waits indefinitely until the user makes a few selections and presses Submit, at which point a webFocus report is generated. I am just adding an intermediate step that will save one of the user entries to a table, and I want to pop up a 'Data Saved' or 'Failed to Save' message.
January 30, 2007, 05:57 PM
susannahnot to beat a dead horse, (or maybe its too late,) if you have a network, that sort of thing is maintained in active directory tables - network logon to computer name
January 31, 2007, 06:56 AM
OPALTOSHAfter your report you could add
-RUN
-IF &LINES GT 0 GOTO REPORTOK;
-TYPE your message or -HTMLFORM htmlpagename
-GOTO EXIT
-REPORTOK
.. whatever you want to do for non zero records
-EXIT
This is the only way to do IF condition THEN action1 ELSE action2
in dialogue manager.
January 31, 2007, 09:39 AM
susannahhowever, Adelaide, he won't see the results of that -TYPE statement unless he views the echo of the job, or the view source on the final report provided echo is on.
February 01, 2007, 12:44 AM
OPALTOSHSusanah,
You are right about the TYPE but that is why I included the HTMLFORM option which will display a message which the user can see.
Or you could run a dummy report which just outputs a heading with the relevant message/information in it.
February 01, 2007, 02:53 PM
Alan MainI didn't realize I could have more than one HTMLFORM section in my .fex file. The following does what I want:
-HTMLFORM BEGIN
<script>
alert("Value &SomeValue saved.");
-HTMLFORM END
-RUN
which is basically what OPALTOSH suggested.
Thanks, all.
February 02, 2007, 05:42 AM
Tony AAlan,
Don't forget to use well formed HTML code in your HTMLFORM section. I know most browsers will suffer it, but one day ................
T