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.
I would like to search for discussions 'Variable BY Fields' but when I do, the word BY is stripped from my search criteria. Has anyone else seen this? Been successful searching or can point me to methods of using variable BY fields?This message has been edited. Last edited by: Kerry,
Standard search engine usage (ish). Enclose your search phrase in double quotes within the input control. If you want to see results in which some of your words appear then prefix it with <ANY>. You can also use <ALL>.
Other words that will be ignored are "A", "OR", "AND" etc.
TThis message has been edited. Last edited by: Tony A,
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, 2004
And to Tony's point about standard search engines: see if you can find my post about the Teradata "QUERY_BAND" command... it's not found via the FocalPoint search, with or without double-quotes. However, I find my FocalPoint post via Google. The reason: the "underscore" is changed to a "space" in FocalPoint... Weird, huh?
BTW: The QUERY_BAND issue has been resolved and it works well within WebFOCUS.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
Originally posted by PBrightwell: If it is of any help, I understand what you mean by "VARIABLE BY FIELDS". Try:
-SET &BY1=IF &SORT1 EQ 'CAR' THEN 'BY CAR' ELSE IF &SORT1 EQ 'COUNTRY' THEN 'BY COUNTRY' ELSE 'BY MODEL';
TABLE FILE CAR SUM SALES &BY1 END
Hi! Complete newbie here, so please excuse my ignorance. I got the above example to work great, but I'm trying to modify it to evaluate whether a field is GT or LT 0 then change the sort order with no luck.
My code: SET ORIENTATION = LANDSCAPE -SET &CHANGE_VALUE = 'TOTAL_CHANGE'; -SET &SORT1 =IF &CHANGE_VALUE LT 0 THEN 1 ELSE 2; -SET &BY1=IF &SORT1 EQ 1 THEN 'BY LOWEST CHANGE_NET' ELSE IF &SORT1.EVAL EQ 2 THEN 'BY HIGHEST CHANGE_NET';
'PRC_MC_PATIENTMIX.ANSWERSET1.PLAN_NAME' AS 'Plan Name' 'PRC_MC_PATIENTMIX.ANSWERSET1.A_QTY/I8' AS 'Units' 'PRC_MC_PATIENTMIX.ANSWERSET1.A_AVG_PRICE/P9.2M' AS 'Avg Rate' 'PRC_MC_PATIENTMIX.ANSWERSET1.A_NET_CHARGE/P9.2M' AS 'Net Charges' 'PRC_MC_PATIENTMIX.ANSWERSET1.B_QTY/I8' AS 'Units' 'PRC_MC_PATIENTMIX.ANSWERSET1.B_AVG_PRICE/P9.2M' AS 'Avg Rate' 'PRC_MC_PATIENTMIX.ANSWERSET1.B_NET_CHARGE/P9.2M' AS 'Net Charges' 'PRC_MC_PATIENTMIX.ANSWERSET1.CHANGE_QTY' AS 'Change in Units' 'PRC_MC_PATIENTMIX.ANSWERSET1.CHANGE_NET/P12.2CM' AS 'Change in Charges' BY 'PRC_MC_PATIENTMIX.ANSWERSET1.LOCATION_ID' NOPRINT BY 'PRC_MC_PATIENTMIX.ANSWERSET1.COST_CODE' NOPRINT &BY1.EVAL
ON PRC_MC_PATIENTMIX.ANSWERSET1.COST_CODE SUBHEAD "ON PRC_MC_PATIENTMIX.ANSWERSET1.COST_CODE SUBFOOT WITHIN "Total:<+0> " " <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> "
WebFOCUS 7.6.11 Windows Server 2003 Excel, PDF and HTML
This question should have been opened in a new post because it is really unrelated to the topic of this post.
You cannot dynamically change a sort condition in the middle of a query. In addition, your Dialogue Manager (DM) statements (begin with a dash) are executed before the FOCUS statements, so it is not possible for a DEFINE to alter the previously set DM variables. The value of &CHANGE_VALUE will always be 'TOTAL_CHANGE', which is greater than zero, so &BY1 will always have a value of 'BY HIGHEST CHANGE_NET'. Note that in PBrightwell's example, the sort order of the output will not change from CAR to COUNTRY when the SUM of SALES is less than or equal to zero. The value for &BY1 must be set in a method external to the query itself. The only potential solution that comes to mind at the moment is a compound report, where the filtering and sort order for each section of the report changes based on previously-determined values from the data source. In other words, you would first need to determine which locations/cost code combinations have TOTAL_CHANGE less than zero and then use that information to generate your compound report.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007