I have a sql statement in a foc exec that upon completion executes another foc exec. Works great for SQL that doesn't have user inputed parameters. But for the ones that require user input parameters i would like it to run the sql and clear the parameter inputs off the screen before running the next FEX i want to call. I'm sure there is a focus command to do this but i can't seem to find it. Any help would be appreciated.
Here is an example
-SET &AGENT_USER = GETUSER('A30');
ENGINE SQLORA SET DEFAULT_CONNECTION ismd01
INSERT INTO PARTNER
(IDPARTNER, BUNAME, NAME, SITECODE, UPDATEUSER, UPDATEDT)
VALUES ((SELECT MAX(IDPARTNER)+1 FROM PARTNER), '&Partner', '&Client_Number', '&Client_Number', '&AGENT_USER', (SELECT SYSTIMESTAMP FROM dual));
EX app/list_partners.fexThis message has been edited. Last edited by: Kerry,
You could simply -SET the values of the variables to blank:
-SET &AGENT_USER = GETUSER('A30'); ENGINE SQLORA SET DEFAULT_CONNECTION ismd01 SQL SQLORA INSERT INTO PARTNER (IDPARTNER, BUNAME, NAME, SITECODE, UPDATEUSER, UPDATEDT) VALUES ((SELECT MAX(IDPARTNER)+1 FROM PARTNER), '&Partner', '&Client_Number', '&Client_Number', '&AGENT_USER', (SELECT SYSTIMESTAMP FROM dual)); END -RUN -SET &Partner = ' '; -SET &Client_Number = ' '; EX app/list_partners.fex
Hmm i put this in and it still creates the report below the parameter inputs for the sql at the top. Is there some other setting i am missing?
I'm a bit uncertain as to what exactly it is what you want/need.
You talk about clearing variables. But when you do an EX, all single &variables will not be available to the procedure being EXed. So setting them to space or whatever has no influence.
You also say
Not quite certain what you mean with this.
I too am not quite understanding what you need. A single form submits a single job/fex. When that fex completes, it creates the output somewhere (on disk or back to the browser/client.) At that point, it's done. There is no stopping in between procedures to request additional parameters. And there is no communication back to the submitting form to clear values or to submit another fex. It just returns the answer set or processing completed message.
In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
Let me see if i can clarify this. I have a report that shows a list of people. The data in this column has a drilldown to a target=_self focexec that is called Add a customer. It passes no fields but the sql focexec it calls looks for a paramter field for the name of the person you want to add. Hence you get the parameter input. You enter the persons name and click run and you get the message 1 row added to the database. If I put the ex list_people at the end it adds the person and runs the report but i still have the parameter input fields used for the sql above the report. What i'm trying to accomplish is you enter the name press run to execute the sql runs and the report runs but clears the original paramater input for the sql off the screen. So it looks like you brought up the list of people with the new person you just added without the parameter input request that was needed for the sql to execute.
|Powered by Social Strata|