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.
Thanks Ram for the quick response and for the solution but I want to know how to pass the &variable from the html page to the fex using Contain or like operator.
In case of multi value parameters for LIKE operator, you need to convert J,Y,W to '%J% OR '%Y%' OR '%W%' to use in filter. I doubt if its possible to pass it directly.
Even in RDBMS in case of multi values for LIKE, you have to break it into 2 conditions using OR clause as below.
column_1 like '%abc%' or column_1 like '%xyz% or etc.
Please let me know how to pass multiple values from the html page to the fex. Also let me know the use of APP PATH IBISAMP in the above step you had mentioned.
If you use list box in html page, then check its property to enable multiple. By default multiple selection from the list box will be passed as comma separated like abc, xyz,etc.
By using APP PATH IBISAMP, I force WF engine to search for CAR master file within IBISAMP folder.
If you have an unknown number of values being passed in you could set up a -REPEAT statement from 1 to no_vals variable with first command
-REPEAT LOOP &CNT from 1 TO &SELECT0 -SET &CODE = IF &CNT EQ Q THEN 'WHERE COUNTRY CONTAINS ''&SELECT&CNT.EVAL''' - ELSE ' OR ''&SELECT&CNT.EVAL''' &CODE.EVAL -LOOP
Not in Webfocus at present (so the syntax might not be 100%) but this technique should work and does work on multi select dropdowns.
Regards, David
Webfocus Release 7.6.11 Unix EXL2K
Posts: 5 | Location: Rhodes | Registered: October 27, 2013
We do this on a couple of Reports. It ,might not be the prettiest way of doing things but it will work
TABLE FILE CAR
PRINT
CAR.ORIGIN.COUNTRY
CAR.COMP.CAR
WHERE CAR.ORIGIN.COUNTRY CONTAINS &COUNTRY.VALIDATE.;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XLSX
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END
Note: The Parameter doesn't contain the quotes around it even though it is an Alpha field.
Then in the Parameter, the User can type (exactly as shown below) 'GLA' OR 'RAN'
-SET &ECHO=ALL;
-* File info4pals02.fex
-DEFAULT &PARM='TIRE,BRAKE,WHEEL'
-* Length of params
-SET &PLEN=&PARM.LENGTH;
-* Strip the commas
-SET &PARMC=STRIP(&PLEN,&PARM,',','A&PLEN');
-* Length without the commas
-SET &ALEN=ARGLEN(&PLEN, &PARMC, 'I3');
-* Number of commas
-SET &CLEN=&PLEN - &ALEN;
-TYPE &PLEN &ALEN &CLEN
-* Length after replacing commas with ' OR '
-SET &OLEN=&PLEN + 5*&CLEN;
-* Replace commas
-SET &P=STRREP (&PLEN, &PARM, 1, ',', 6, ''' OR ''', &OLEN, 'A&OLEN.EVAL');
-SET &P='''' | &P ||'''';
-* Run the procedure
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY STANDARD
IF STANDARD CONTAINS &P
END
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, 2006