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     Passing multi values in a &var to a web service

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Passing multi values in a &var to a web service
 Login/Join
 
Platinum Member
posted
Hi All,

I have combobox in my html page that accepts multiple values and I wrote a javascript function to parse that values and put it in a 'value1','value2',...etc format.

So PROCCODE = 'D498','D2M8' is then passed to my FEX to call a webservice to get the data.

Here's a snippet:

-SET &WHR_PROCESSCODE = 'WHERE strProcessCode EQ ' | '''' | &PROCCODE | '''' | ' ;' ;

TABLE FILE rv_getfabproductasobjectarray_ws
SUM
BASEPRODUCT
LINECODE
PROCESSCODE
DIVISIONPRODUCT
CONDITIONKEY
STEPCODE
BY
BASEPRODUCT NOPRINT
BY
LINECODE NOPRINT

&WHR_PROCESSCODE
&WHR_DIVISIONPRODUCT
&WHR_BASEPRODUCT
&WHR_CONDITIONKEY
&WHR_STRSTEPCODE

ON TABLE HOLD AS RV_PRODUCT_TMP
END

The error message:


TABLE FILE rv_getfabproductasobjectarray_ws
SUM
BASEPRODUCT
LINECODE
PROCESSCODE
DIVISIONPRODUCT
CONDITIONKEY
STEPCODE
BY
BASEPRODUCT NOPRINT
BY
LINECODE NOPRINT
WHERE strProcessCode EQ ''D498','D2M8'' ;
WHERE strDivisionProduct EQ ' ' ;
WHERE strBaseProduct EQ ' ' ;
WHERE strConditionKey EQ ' ' ;
WHERE strStepCode EQ 'A01J41' ;
-* ON TABLE HOLD AS RV_PRODUCT_TMP
END
-EXIT
0 ERROR AT OR NEAR LINE 15 IN PROCEDURE newfex FOCEXEC *
(FOC257) MISSING QUOTE MARKS: ,'D2M8'' ;
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT


I need to pass the value of process code to the webservice in 'value1','value2' format (value in single quotes).

Any inputs or suggestions would be greatly appreciated.

Dan


Dev: WebFOCUS 7.6.10, Data Migrator 7.6.10
QA: WebFOCUS 7.6.10, Data Migrator 7.6.10
Prod: WebFOCUS 7.6.2, Data Migrator 7.6.8
Windows 2K3, Tomcat 5.5.17, IIS 6
Usage: HTML, PDF, Excel, Self-serve, BID and MRE
 
Posts: 197 | Location: Roseville, CA | Registered: January 24, 2005Report This Post
Expert
posted Hide Post
WHERE strProcessCode EQ ''D498','D2M8'' ;

Wouldn't this be better:
WHERE strProcessCode IN ('D498','D2M8');


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
Platinum Member
posted Hide Post
Francis,

I need to pass the whole 'D498','D2M8' string to a parameter in the webservice. There is logic in the webservice that will parse this and query whatever data source it needs.

If I access the webservice directly via browser, I enter 'D498','D2M8' on the Process Code parameter input and were no errors and I get data returned as object array.


Dev: WebFOCUS 7.6.10, Data Migrator 7.6.10
QA: WebFOCUS 7.6.10, Data Migrator 7.6.10
Prod: WebFOCUS 7.6.2, Data Migrator 7.6.8
Windows 2K3, Tomcat 5.5.17, IIS 6
Usage: HTML, PDF, Excel, Self-serve, BID and MRE
 
Posts: 197 | Location: Roseville, CA | Registered: January 24, 2005Report This Post
Expert
posted Hide Post
You may get away with QUOTEDSTRING:

-SET &ECHO=ALL;

-SET &VAR1 = '''' | 'CANADA' | ''',''' |'UKRAINE' | '''';

-TYPE &VAR1

TABLE FILE CAR
PRINT
EQUIP
WHERE EQUIP EQ &VAR1.QUOTEDSTRING
END
-RUN


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
Virtuoso
posted Hide Post
quote:
WHERE strProcessCode EQ ''D498','D2M8'' ;


You need to generate
WHERE strProcessCode EQ '''D498'',''D2M8''' ;

(doubling all but the outermost quote marks),

so Focus will parse it properly as a single quoted value, and will pass
'D498','D2M8'
to the called service as a single value.

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Platinum Member
posted Hide Post
That's it! Thanks Francis and J.G. for your suggestions.


Dev: WebFOCUS 7.6.10, Data Migrator 7.6.10
QA: WebFOCUS 7.6.10, Data Migrator 7.6.10
Prod: WebFOCUS 7.6.2, Data Migrator 7.6.8
Windows 2K3, Tomcat 5.5.17, IIS 6
Usage: HTML, PDF, Excel, Self-serve, BID and MRE
 
Posts: 197 | Location: Roseville, CA | Registered: January 24, 2005Report 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     Passing multi values in a &var to a web service

Copyright © 1996-2020 Information Builders