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     [SOLVED]How to pass multiple values of same parameter name through URL?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]How to pass multiple values of same parameter name through URL?
 Login/Join
 
Guru
posted
Hi,

How to pass the multiple values of same parameter name by calling through URL(non-MRE reports)?

For a single parameter value, below URL value works
http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=test&CNTY=ITALY  


-* test.fex
TABLE FILE CAR
PRINT COUNTRY
WHERE COUNTRY EQ '&CNTY';
END


Now, how to pass "Multiselect OR" type?

Let's say, ENGLAND & ITALY on the same URL.

Thanks,
Rifaz

This message has been edited. Last edited by: Rifaz,


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Virtuoso
posted Hide Post
There are many different ways to it. Try this URL for instance although it may look a bit "hack-y" Smiler

/ibi_apps/WFServlet?IBIF_ex=test&CNTY=%27ITALY%27%20OR%20%27ENGLAND%27


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


Hope that helps.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Guru
posted Hide Post
Thanks njsden,

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
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Expert
posted Hide Post
%27 is a single quote, and %20 is a space... Spaces are not allowed in URLs.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Silver Member
posted Hide Post
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.


WF: WebFocus 7.7.03
Data: Oracle, MSSQL, DB2
OS: Windows
Output: HTML/AHTML,PDF,EXL2K FORMULA, COMT
 
Posts: 43 | Registered: November 21, 2011Report This Post
Guru
posted Hide Post
Thanks Doug & nd,

Francis, I'm using MS SharePoint, not our HTML Composer.

Thanks,
Rifaz


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Guru
posted Hide Post
In 80,i know, we can call the fex in MR by
http://servername:portnumber/ibi_apps/views.bip?BIP_REQUEST_TYPE=BIP_RUN&BIP_folder=IBFS:/WFC/Repository/foldername&BIP_item=procedurename.fex  

Which is the better way to call the fex either from EDASERVE or MR?


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Virtuoso
posted Hide Post
I would suggest:
/ibi_apps/WFServlet?IBIF_ex=test&CNTY=ITALY%27%20OR%20%27ENGLAND


and:
  
-* 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

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
<FreSte>
posted
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
 
Report This Post
Guru
posted Hide Post
Thanks Daniel for your confirmation.
FreSte, your suggestion helps me a lot in this. I'm going to bookmark this. Good One

Thanks,
Rifaz


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report 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     [SOLVED]How to pass multiple values of same parameter name through URL?

Copyright © 1996-2020 Information Builders