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.
Thank you all, in advance, for your insight. Specific answers or a link to a doc further explaining the ins and outs of a cgi call would be appreciated!
A) what is the syntax needed in the cgi call that allows you to...
1) pass multiple values for a parameter (say several values for &SKEY=935+936+937)? and 2) pass a null value (say &DEV='')? 3) pass a value that tells the fex to accept any values (say &ACTION=*)?
B) what is the syntax in the fex needed to accept 1) one or multiple parameters (the above scenarios into a WHERE clause)
And the gears of WF developers around the globe begin to turn, crawling over the many possible solutions. Turn, oh gears, Turn!
---Adam
------------------------------------------------------------------------ PROD: WebFOCUS 7.1.3 on Win 2K/IIS 6/ISAPI Mode TEST: WebFOCUS 7.1.3 on Win 2K/IIS 6/ISAPI Mode
Posts: 13 | Location: Pittsburgh, PA USA | Registered: November 18, 2005
are you asking how to pass multiple choice values? the parm names change for a multiple choice variable: &PARM1=VALUE1&PARM2=VALUE2&PARM3=VALUE4 yadayada with &PARM0 being the number of choices
2. &PARM2=VALUE&PARM3=&PARM4=VALUE 3. the value for all values of a field is $* except if the field is only 1 character wide and then i think its $ but check it.
B1. theres a good example of how to process a multiple choice of a parm written on the support site by Renee Teatro. do a search on the tech support site on 'multiple choice' maybe.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
WebFOCUS handles multiple variables internally and will churn out a range of variables as a result. As you may know, you create an HTML page and insert a SELECT control that has a MULTIPLE attribute to pass multiple variables via your URL. For instance, if your SELECT control looked something like -
and you chose all of the options, the URL produced when the FORM is submitted would have the string &Country=ENGLAND&Country=FRANCE&Country=ITALY&Country=JAPAN&Country=W%20GERMANY - e.g. 5 variables of the control name Country.
When WebFOCUS receives these, they are manipulated internally to produce the folowing variables -
&Country = ENGLAND &Country0 = 5 &Country1 = ENGLAND &Country2 = FRANCE &Country3 = ITALY &Country4 = JAPAN &Country5 = W GERMANY
You can see that WebFOCUS has created a new variable for each received value plus an initial one to hold the number of values received.
As WebFOCUS has given you all that you require within your .fex, and &Country0 will only exist when multiple values are passed, you can code something like -
-* Check if multiple values exists
-IF NOT(&Country0.EXISTS) THEN :label;
-* Build your code phrase as required for mulitple values
etc.
At my current Client site, we build an SQL IN statement, but DM is very versatile so the world's your oyster!
Note for existing Users: Be Aware that in 7.1.3 the base variable (e.g. &Country) has "disappeared" meaning that you will have some code checking to do when you upgrade - if you use multiple variables I have raised a case for this on Tech Support and am currently awaiting a response.
Enjoy ....
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Originally posted by Tony A: Note for existing Users: Be Aware that in 7.1.3 the base variable (e.g. &Country) has "disappeared" meaning that you will have some code checking to do when you upgrade - if you use multiple variables
-SET &COUNTER=1; TABLE FILE SHORT SUM PROJECTED_RETURN BY COUNTRY -IF &COUNTRY.EXISTS THEN GOTO LOOP1 ELSE GOTO DONE; -LOOP1 WHERE COUNTRY EQ '&COUNTRY' -IF &COUNTRY0.EXISTS NE 1 THEN GOTO OUTLOOP; -REPEAT OUTLOOP FOR &COUNTER FROM 2 TO &COUNTRY0; OR '&COUNTRY.&COUNTER' -OUTLOOP -DONE ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF,$ ENDSTYLE END
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Ok, Bombs was a little OTT but below is the URL, the code run and the output from the &ECHO -
URL - http://localhost/ibi_apps/WFServlet?IBIF_ex=multirpt&IB...ISRAEL&COUNTRY=JAPAN
The Code -
-SET &ECHO=ALL;
-? &COUNTRY
-SET &COUNTER=1;
TABLE FILE SHORT
SUM PROJECTED_RETURN
BY COUNTRY
-IF &COUNTRY.EXISTS THEN GOTO LOOP1 ELSE GOTO DONE;
-LOOP1
WHERE COUNTRY EQ '&COUNTRY'
-IF &COUNTRY0.EXISTS NE 1 THEN GOTO OUTLOOP;
-REPEAT OUTLOOP FOR &COUNTER FROM 2 TO &COUNTRY0;
OR '&COUNTRY.&COUNTER'
-OUTLOOP
-DONE
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$
ENDSTYLE
END
The output -
CURRENTLY DEFINED & VARIABLES STARTING WITH 'COUNTRY':
&COUNTRY0 = 2
&COUNTRY1 = ISRAEL
&COUNTRY2 = JAPAN
-? &COUNTRY
-SET &COUNTER=1;
TABLE FILE SHORT
SUM PROJECTED_RETURN
BY COUNTRY
-IF 0 THEN GOTO LOOP1 ELSE GOTO DONE;
-DONE
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$
ENDSTYLE
END
0 NUMBER OF RECORDS IN TABLE= 526 LINES= 15
As I say, I have raised a case with the local office and have asked that it is pushed to the Product Div. I'll keep you posted.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
This should work, under both the old rules and the new ones, whether zero, one, or more values are selected.
-* Handles multiselect named C.
-* Assumes:
-* If no values selected, &C and &C0 do not exist
-* If one value selected, &C exists
-* If more than one value selected, &C0 (and &C1 ...) exist
TABLE FILE CAR
SUM SALES BY COUNTRY
-IF (&C0.EXIST) THEN GOTO C.LIST
-ELSE IF (&C.EXIST) THEN GOTO C.ONE
-ELSE GOTO C.DONE;
-C.LIST * one or more
WHERE COUNTRY EQ '&C1'
-REPEAT C.LOOP FOR &COUNTER FROM 2 TO &C0;
OR '&C.&COUNTER'
-C.LOOP
;
-GOTO C.DONE
-C.ONE * exactly one
WHERE COUNTRY EQ '&C';
-C.DONE
END
This message has been edited. Last edited by: j.gross,
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
A good work around j.g. and there are many more. Fortunately we only had a handful (lt 50) fexes that were affected but the fact remains that this is a change to the way it should work. Hopefully a fix will be available once the case is with the PM.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
If you are experiencing the same problem, and you will if you use multiple variable values, then please raise a case through Tech Support and reference case no 21372036.
Hopefully that will raise the profile and get the required fix ASAP.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Case is now with Product division (along with a few other reports of the same problem!) where it is, apparently, a high priority. So good news - hopefully.
I would mention that the sample given in the IB document referenced above by j.g. is not entirely elegant code but it served a purpose .
As I have already produced a workaround, I thought that I would share it with you. This works in both 7.1.3 and 5.3.2 and therefore should be fairly future proof (e.g. post fix)? -
-* File test_multi.fex
-SET &ECHO=ALL;
-DEFAULT &Country = 'FOC_NONE'
-DEFAULT &Countries = ''
-IF &Country EQ 'FOC_NONE' AND NOT(&Country0.EXISTS) THEN :NoGroup;
-SET &Cnt = IF &Country1.EXISTS THEN '1' ELSE '';
-SET &Countries = '(''' || &Country&Cnt.EVAL || ''',';
-IF &Country0.EXISTS EQ 0 THEN :Loop3;
-SET &Cnt = 2;
-SET &LoopCntr = &Country0 - 1;
-REPEAT :Loop3 &LoopCntr TIMES;
-SET &Countries = &Countries || '''' || &Country&Cnt.EVAL || ''',';
-SET &Cnt = &Cnt + 1;
-:Loop3
-SET &Countries = &Countries || '''~'')';
-:NoGroup
-* The "contains" statement is required for pre 7.1.3 release
-SET &Ctry_Cmt = IF &Countries EQ '' OR &Countries CONTAINS 'FOC_NONE' THEN '-*' ELSE '';
TABLE FILE CAR
BY COUNTRY
&Ctry_Cmt.EVAL WHERE COUNTRY IN &Countries
END
-* Use this URL to test
-* http://[server]/ibi_apps/WFServlet?IBIF_ex=test_multi&IBIAPP_app=[appname]
&Country=ENGLAND&Country=FRANCE&Country=JAPAN&Country=W%20GERMANY&Country=ITALY
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
There was a bug in 7.1.3 & 7.1.4 when using multiple parameters. In the documentation, the COUNTRY parameter was not initialized to the same value as COUNTRY1.
For example:
COUNTRY0 3 COUNTRY ENGLAND COUNTRY1 ENGLAND COUNTRY2 FRANCE COUNTRY3 ITALY
The code was corrected in 7.1.5 and also in the upcoming release of 7.6. There is a Hotfix for 7.1.3 and 7.1.4. The PM suggests that customers can contact Technical Support for the fix. The Release Notes will also reflect this information.
Hope this helps.
Regards, JennThis message has been edited. Last edited by: <DocServices>,
Jennifer, Thanks for all your help. I have few questions regarding the problem on hand. 1.Is the HotFix for Reporting server only or is this fix for all 3 components (reporting server, web server and dev. studio)? 2. Would previous code work after the fix or do we need to make any changes to the code as well? I appreciate everyone's response and insight. You guys are great helping a novice like myself . Thanks. Mike
Prod: WebFOCUS 7.1.3 on Linux Kernel-2.6.5 zSeries 64bit/Apache Tomcat/5.0.28 JAVA version 1.4.2_11 server
Posts: 35 | Location: Oklahoma City | Registered: May 11, 2006