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.
Q. How can I eliminate the Systemwide reference in my heading when only a store name is selected by a user?
We’re trying to set the filters/parameters such that when a user selects a particular store/dealership without first selecting a state, the heading only includes the store name without the Systemwide reference.
Here’s my code:
-SET &RPT_HEAD = ('Sales Year)||(' ' | &SALES_YEAR); -SET &STATE_HEAD = IF &STATE_NAME EQ '_FOC_NULL' THEN 'Systemwide' ELSE &STATE_NAME; -SET &STORE_HEAD = IF &STORE_NAME EQ '_FOC_NULL' THEN ' ' ELSE &STORE_NAME;
Those parameters appear later in the code like this:
SUM PCT.MV_SALES.MV_SALES.HEADCOUNT/P8.1 AS " " BY MV_SALES.MV_SALES.SALESPERSON WHERE MV_SALES.MV_SALES.PRODUCT_NAME NE 'Not Included'; WHERE MV_SALES.MV_SALES.SALES_YEAR EQ '&SALES_YEAR.(FIND MV_SALES.MV_SALES.SALES_YEAR IN MV_SALES).Year:.'; WHERE MV_SALES.MV_SALES.STORE_NAME EQ '&STORE_NAME.(FIND MV_SALES.MV_SALES.STORE_NAME IN MV_SALES).Store:.'; WHERE (MV_SALES.MV_SALES.PRODUCT_NAME NE 'Not Included' ) AND MV_SALES.MV_SALES.STATE_NAME EQ '&STATE_NAME.(,,,).State:.'; HEADING "Acme Product Company" "Number of Sales Transactions by Salesperson" "&RPT_HEAD" "&STATE_HEAD" "&STORE_HEAD"
In my HTML page, the STATE_NAME parameter is a static parameter with an ignore value of “Statewide.”
The STORE_NAME parameter is a dynamic parameter and is chained to the STATE_NAME parameter. An ALL option in the STORE_NAME parameter allows users to select a particular state and run the report for all of the stores in that state.This message has been edited. Last edited by: JulieA,
One of the most effective debuging techniques with variables is to use
-SET &ECHO=ALL;
at the very top of the .fex so when you look at the page source, you'll see what values are being substituted. You might be looking for _FOC_NULL but maybe your HTML is sending FOC_NONE. Take a look at the substitutions in the echo so you can figure out how to deal with the IF THEN ELSE.
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
This will do the trick, if I understand your question correctly.
instead of CODE] -SET &STATE_HEAD = IF &STATE_NAME EQ '_FOC_NULL' THEN 'Systemwide' ELSE &STATE_NAME; [/CODE]
do
-SET &STATE_HEAD = IF &STATE_NAME EQ '_FOC_NULL' AND &STORE_NAME EQ '_FOC_NULL' THEN 'Systemwide' ELSE
- IF &STATE_NAME EQ '_FOC_NULL' THEN '' ELSE &STATE_NAME ;
So, State_head will only be 'Systemwide' if both State and Store are _FOC_NULL. If State is _FOC_NULL but STORE isn't it's '' and is State isn't _FOC_NULL then be whatever the selection was.
Good luck !
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010
don't know what DRPBLANKLINE is , but I do this sort of thing the easy way. I create a comment field based upon the value in &STATE_HEAD. eg: -SET &cmt_statehead= IF &STATE_HEAD.QUOTEDSTRING IS &STATE_NAME.QUOTEDSTRING THEN ' ' ELSE '-*'; .... then
HEADING "Acme Product Company" "Number of Sales Transactions by Salesperson" "&RPT_HEAD" &cmt_statehead.EVAL "&STATE_HEAD" "&STORE_HEAD"
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Thank you Susannah! That helped me some as well. Between you and Dave, I'm almost done solving my challenge in setting my headings correctly. I'll tinker with the code you sent just a bit more. I think I know what to do now. Either way, I'll post an update soon. Thanks again.
Problem is that we create a blank line. Susannah tries to elimitate it by adding a comment line.
There are other solutions ( there-are-always-multiple-solutions™ )
Use IFs:
HEADING
"Acme Product Company"
"Number of Sales Transaction by Wile E. Coyote"
-IF &RPT_HEAD NE '' THEN CONTINUE ELSE GOTO SKIP_RPT_HEAD;
"&RPT_HEAD"
-SKIP_RPT_HEAD
-IF &STATE_HEAD NE '' THEN CONTINUE ELSE GOTO SKIP_STATE_HEAD;
"&STATE_HEAD"
-SKIP_STATE_HEAD
-IF &STORE_HEAD NE '' THEN CONTINUE ELSE GOTO SKIP_STORE_HEAD;
"&STORE_HEAD"
-SKIP_STATE_HEAD
Add the quotes to the parameter: -SET &STATE_HEAD = IF &STATE_NAME EQ '_FOC_NULL' AND &STORE_NAME EQ '_FOC_NULL' THEN '"Systemwide"' ELSE - IF &STATE_NAME EQ '_FOC_NULL' THEN '' ELSE '"' | &STATE_NAME | '"' ; HEADING &STATE_HEAD
Good luck
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010
As it turns out, the first post you provided helped me the most as we've decided to alter our headings somewhat . However, I want to thank you and Susannah for all of the assistance you have provided me. I'm going to save a link to these posts because I know I'll need something similar in the future.