Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Calling Multiple FEXs from an HTML page

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Calling Multiple FEXs from an HTML page
 Login/Join
 
Member
posted
Hi, I'm running WF 5.24 on Windows XP. I have a HTML page that has a drop down list for the user to select a report. Once the report is selected and they hit View, I interrogate the value and based on that value do a GOTO that should, theoretically EX that foc exec.

The problem I'm having is that my -if tests don't seem to be working and the code just keeps falling through my tests. I've tried it with the THEN GOTO, the IF THEN ELSE, I've thrown in a bunch of -RUNs but it keeps wanting to execute only the first section's code.

Any ideas what I'm missing?

My code and code results are below

code..
..


-HTMLFORM END
-EXIT

-RPTCode
-SET &ECHO = ALL;
-TYPE '&SELCRITERIA1';
-IF '&SELCRITERIA1' EQ 'bestex' THEN GOTO BESTEX;
-RUN
-IF '&SELCRITERIA1' EQ 'txnact' THEN GOTO TXNACT;
-RUN
-BESTEX
-RUN
EX RPT_DRVR
-RUN
-GOTO CONTD;
-RUN
-TXNACT
-RUN
EX webmd_ah_txnact
-RUN
-GOTO CONTD;
-RUN
-CONTD
END

Here are my results (I intentionally put in a bad fex name to see the results while testing)

-DEFAULT &SELCRITERIA1 = '';    
-DEFAULT &INITPAGE = 'yes'; 
-IF no EQ 'no' GOTO RPTCode;
-RPTCode
-SET &ECHO = ALL;
-TYPE  'txnact';
'txnact';
-IF 'txnact' EQ 'bestex' THEN GOTO BESTEX;
-RUN
-IF 'txnact' EQ 'txnact' THEN GOTO TXNACT;
-RUN
-BESTEX                        
-RUN                             
EX RPT_DRVR
-RUN                           
(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: RPT_DRVR
 
Posts: 7 | Registered: September 08, 2006Report This Post
Guru
posted Hide Post
Try it without -RUN after the -IF stmts.


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Virtuoso
posted Hide Post
Do you have quotes around the & variables in the -IF statement? Remove the single quotes from around the & variables in the -IF statements.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
The code does not work because it is comparing the name of the variable to the value. The NAME of the variable will never EQ the value.

There are actually two ways to fix this.

NO QUOTES AROUND THE & VARIABLE:

-SET &DUMMY='MAGTEST';
-IF (&DUMMY EQ 'MAGTEST') GOTO YES;
-TYPE THEY DO NOT MATCH
-GOTO THEEND
-YES
-TYPE THEY MATCH!!!
-THEEND

or

USE .EVAL ON THE & VARIABLE NAME IN THE QUOTES:

-SET &DUMMY='MAGTEST';
-IF ('&DUMMY.EVAL' EQ 'MAGTEST') GOTO YES;
-TYPE THEY DO NOT MATCH
-GOTO THEEND
-YES
-TYPE THEY MATCH!!!
-THEEND


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Silver Member
posted Hide Post
you might want to try something like:

-RPTCode
-SET &ECHO = ALL;
-TYPE &SELCRITERIA1
-SET &FRUN = DECODE &SELCRITERIA1 ('bestex' 'RPT_DRVR'
- 'txnact' 'webmd_ah_txnact' ELSE '???');
EX &FRUN
-RUN
-CONTD

hth,

drew


WF 7.6.6 Linux, FOCUS 7.8 zOS
 
Posts: 46 | Location: San Francisco, California | Registered: April 14, 2003Report This Post
Expert
posted Hide Post
agree with Mickey and Drew, and here's another flavor
-*
-RPTCode
-GOTO do.&SELCRITERIA1 ;
-do.bestex
-RUN
EXEC RPT_DRVR
-RUN
-GOTO eoj.launch;
-RUN
-do.txnact
-RUN
EXEC webmd_ah_txnact
-RUN
-GOTO eoj.launch;
-RUN
-eoj.launch
END




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Yes! Thank-you folks for your awesome suggestions and techniques, I'm filing those away for future reference. This makes a huge impact on my website plans. And I'm very glad to know that the single quotes around my variable would impact the query that way. Thanks so much. Happy and Healthy New Year to all
 
Posts: 7 | Registered: September 08, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Calling Multiple FEXs from an HTML page

Copyright © 1996-2020 Information Builders