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     CGI call - 1) how to pass multiple values for a parameter 2) how to pass...

Read-Only Read-Only Topic
Go
Search
Notify
Tools
CGI call - 1) how to pass multiple values for a parameter 2) how to pass...
 Login/Join
 
Member
posted
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!

When using a CGI call to run the fex, nuinv, structured as follows...
http://webfocus/cgi-bin/ibi_cgi/ibiweb.exe?IBIF_ex=nuin...EST=DEV&ACTION=PRINT

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, 2005Report This Post
Virtuoso
posted Hide Post
And the gears of WF developers around the globe begin to turn, crawling over the many possible solutions. Turn, oh gears, Turn

Ha! Smiler


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
1.this is for multiple paramters:
http://webfocus/cgi-bin/ibi_cgi/ibiweb.exe?IBIF_ex=nuin...M2=VALUE&PARM3-VALUE etc
But i don't think that's what you're asking,
What you're suggested in your #1 doesn't actually work for any thing.

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, 2003Report This Post
Expert
posted Hide Post
Adam,

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 -
<SELECT name=Country LINES=4 MULTIPLE>
<OPTION value="ENGLAND">England
<OPTION value="FRANCE">France
<OPTION value="ITALY">Italy
<OPTION value="JAPAN">Japan
<OPTION value="W GENRMANY">West Germany
</SELECT>

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, 2004Report This Post
Member
posted Hide Post
Wow, the gears have indeed turned, and turned well, thank you susannah and Tony.

I will take this information as blueprints for more report building today.

This appears to have answered my question(s) and after some testing, will recount my successes to you.

Thanks again for some excellent input!

---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, 2005Report This Post
Virtuoso
posted Hide Post
quote:
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


IOW the sample code appearing in http://documentation.informationbuilders.com/masterinde...pslang/codingui7.htm is not valid in 713:

Procedure: MULRPT.FEX

-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, 2005Report This Post
Expert
posted Hide Post
Spot on, it bombs, requesting value for &Country. I'll post the output from &ECHO tomorrow when I get chance.

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, 2004Report This Post
Expert
posted Hide Post
Yikes. Thanks T




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
Expert
posted Hide Post
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, 2004Report This Post
Virtuoso
posted Hide Post
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, 2005Report This Post
Expert
posted Hide Post
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, 2004Report This Post
Expert
posted Hide Post
Fellow Focal Point members,

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, 2004Report This Post
Expert
posted Hide Post
An update -

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 Smiler.

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, 2004Report This Post
Silver Member
posted Hide Post
We are using 7.1.3 as well. I tried using the suggested fix but it did not work. Any update or any other suggestion?

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, 2006Report This Post
Expert
posted Hide Post
doc serve, if you have your ears on,
has this 'code tightening' been appropriately loosened backup in 714??




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
<DocServices>
posted
My ears are on...

I have contacted the PM to verify. I should have an answer or suggestion soon.

Regards,
Jenn
 
Report This Post
<DocServices>
posted
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,
Jenn

This message has been edited. Last edited by: <DocServices>,
 
Report This Post
Expert
posted Hide Post
Answer for A3):

Pass the value "FOC_NONE":

-DEFAULT &VALUE1 = 'FOC_NONE';

TABLE FILE CAR
PRINT COUNTRY
WHERE (COUNTRY EQ '&VALUE1');
END
-RUN

Several documents refer to this feature as "FOCNONE" which appears to be incorrect, like here (you will need to sign-in): http://documentation.informationbuilders.com/masterinde...3devapps/layout8.htm

Please note the warning here (you will need to sign-in):
http://techsupport.informationbuilders.com/sps/12862045.html


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
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 Smiler.
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, 2006Report This Post
<DocServices>
posted
Hi Mike,

The following answer is for question 1 (from the PM):
"A Client fix for WebFOCUS and Developer Studio."

Hope this helps.
 
Report 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     CGI call - 1) how to pass multiple values for a parameter 2) how to pass...

Copyright © 1996-2020 Information Builders