There I am attempting to pass 'ITALY' OR 'ENGLAND' as the actual parameter. Note that single quotes are part of the value; therefore, you'd adjust your WHERE condition slightly:
-* test.fex
TABLE FILE CAR
PRINT COUNTRY
WHERE COUNTRY EQ &CNTY ;
END
It works actually,but how did you know this junkie needs to be included in the URL %27 and %20, do we need to see it in any trace files?
Regards, Rifaz
-Rifaz
WebFOCUS 7.7.x and 8.x
October 23, 2013, 03:03 PM
Doug
%27 is a single quote, and %20 is a space... Spaces are not allowed in URLs.
October 23, 2013, 03:06 PM
Francis Mariani
Rifaz, are you using HTML Composer to design a parameter screen? If so, a control with the multiple option selected will automatically pass the multiple values with the OR inserted between each selected value. Depending on how you developed the report and the parameter screen, you can also have AND or commas separating the multiple values.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 23, 2013, 05:38 PM
nd
The %20 and %27 are from a tool called URL Encoding.
If you have
WHERE COUNTRY EQ &CNTY
And you pass the parameters as in njsden's example above, WebFOCUS would have an ordinary string as the parameter value, without the encoded characters. So that it would resolve to
WHERE COUNTRY EQ 'ITALY' OR 'ENGLAND'
Your web server logs (not focus traces) would be the place to capture whether the URLS had encoded characters. They show the % signs and so forth.
-* test.fex
TABLE FILE CAR
PRINT COUNTRY
WHERE COUNTRY EQ '&CNTY';
END
for syntax purposes.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
October 25, 2013, 04:47 AM
<FreSte>
Passing multiple values with the same name will cause index'd variables in WebFOCUS
If you pass this URL: /ibi_apps/WFServlet?IBIF_ex=test&CNTY=ITALY and you would do
-? &CNTY in your test.fex it will show you:
CURRENTLY DEFINED & VARIABLES STARTING WITH 'CNTY':
&CNTY = ITALY
If you pass this URL: /ibi_apps/WFServlet?IBIF_ex=test&CNTY=ITALY&CNTY=ENGLAND&CNTY=JAPAN
-? &CNTY in your test.fex it will show you:
CURRENTLY DEFINED & VARIABLES STARTING WITH 'CNTY':
&CNTY = ITALY
&CNTY0 = 3
&CNTY1 = ITALY
&CNTY2 = ENGLAND
&CNTY3 = JAPAN
Variable &CNTY0 will tell you how many &CNTYxx variables there are. Variable &CNTY will always be the same as the first index'd variable (&CNTY1)
In your fex you can do something like this:
-DEFAULTH &CNTY0 = 0;
TABLE FILE CAR
SUM
DEALER_COST
BY COUNTRY
WHERE COUNTRY EQ &CNTY.QUOTEDSTRING
-REPEAT :LB_LOOP_CNTY FOR &I FROM 2 TO &CNTY0;
OR &CNTY.&I.QUOTEDSTRING
-:LB_LOOP_CNTY
;
END
October 25, 2013, 01:44 PM
Rifaz
Thanks Daniel for your confirmation. FreSte, your suggestion helps me a lot in this. I'm going to bookmark this.