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 several values of one parameter when drilldown

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] how to pass several values of one parameter when drilldown
 Login/Join
 
Member
posted
hi guys
code first:
-SET &ECHO=ALL;
-DEFAULTS &PRO_CODE='''CA0JJB001'',''CA0JJB002''';
TABLE FILE RP_PRODUCT_RATE_CPM
SUM
SALESPLAN_WEEK_QU
BY WEEK_HAIER
BY PRO_CODE
WHERE PRO_CODE IN (&PRO_CODE);
-*WHERE WEEK_HAIER IN ('11','9','10');

HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=TITLE,
COLUMN=N2,
DRILLMENUITEM='to product_code',
FOCEXEC=TESTPCT(PRO_CODE='&PRO_CODE'),
TARGET='_self',
$

ENDSTYLE
END

the parameter pro_code has several values,
what should i do to pass it to another .fex when drilldown?

it displays like this js info when mouser on pro_code title
javascript:MDiteClick(0,'PRO_CODE=&CAOJJB001','CAOJ00B002''=','');


wf version: 7.65

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


webfocus 7.65
windows xp sp3
excel,html ,pdf,and graph
 
Posts: 20 | Registered: January 26, 2010Report This Post
Expert
posted Hide Post
The working code below should be self-explanatory.


  • &COUNTRY is the variable passed to the fex from a launch page or from the multi-drilldown click.
  • &COUNTRY_JS translates the single-quotes to double-quotes to enable the internal WebFOCUS JavaScript function to work.
  • &COUNTRY1 translates the double-quotes to single-quotes for use in the WebFOCUS filter. Double-quotes are passed to &COUNTRY only from the multi-drilldown click, not from a launch page.


-* File swell1.fex

-SET &ECHO=ALL;

-DEFAULT &COUNTRY = '''ENGLAND'',''FRANCE''';

-*-- if execution of this fex was from a multi-drilldown click, translate the " to '
-SET &COUNTRY1 =
-  IF POSIT(&COUNTRY, &COUNTRY.LENGTH, '"', 1, 'I6') GE 1
-  THEN CTRAN(&COUNTRY.LENGTH, &COUNTRY, BYTVAL('"','I3'), BYTVAL('''','I3'), 'A&COUNTRY.LENGTH')
-  ELSE &COUNTRY;

-*-- translate ' to " for multi-drilldown links - required for the internal WebFOCUS JavaScript
-SET &COUNTRY_JS = CTRAN(&COUNTRY.LENGTH, &COUNTRY, BYTVAL('''','I3'), BYTVAL('"','I3'), 'A&COUNTRY.LENGTH');

TABLE FILE CAR
SUM
SALES
BY COUNTRY
BY CAR
BY MODEL
BY BODYTYPE

WHERE COUNTRY IN (&COUNTRY1);

HEADING
"&COUNTRY1"
" "

ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
TYPE=TITLE, COLUMN=N2,
  DRILLMENUITEM='to Countries',
  FOCEXEC=SWELL1(COUNTRY='&COUNTRY_JS'),
  TARGET='_self',
$
TYPE=TITLE,
     STYLE=BOLD,
$
ENDSTYLE
END


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
Member
posted Hide Post
francis thanks a lot
it worked ~~

but now i have another question

when i change the code :
TYPE=TITLE, COLUMN=N2,
DRILLMENUITEM='to Countries',
FOCEXEC=SWELL1(COUNTRY='&COUNTRY_JS'),
TARGET='_self',
$

to

TYPE=TITLE, COLUMN=N2,
FOCEXEC=SWELL1(COUNTRY=&COUNTRY.QUOTEDSTRING),
TARGET='_self',
$

It also worked .bu when i add the drillmenuitem
it will display an error. why it happened?
error code
TYPE=TITLE, COLUMN=N2,
DRILLMENUITEM='to Countries',
FOCEXEC=SWELL1(COUNTRY=&COUNTRY.QUOTEDSTRING),
TARGET='_self',
$


webfocus 7.65
windows xp sp3
excel,html ,pdf,and graph
 
Posts: 20 | Registered: January 26, 2010Report This Post
Expert
posted Hide Post
A normal drilldown does not use JavaScript (unless you specify a JS function - that you have control over). A drilldown with DRILLMENUITEM uses JavaScript functions provided by Information Builders, and that's where the quote problem occurs. If you only have one drilldown, don't use DRILLMENUITEM.


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
Member
posted Hide Post
got it.
many thanks


webfocus 7.65
windows xp sp3
excel,html ,pdf,and graph
 
Posts: 20 | Registered: January 26, 2010Report 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 several values of one parameter when drilldown

Copyright © 1996-2020 Information Builders