Focal Point
[CLOSED] Focal Point stips the word BY from the search

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/396104773

February 22, 2010, 11:28 AM
Don Garland
[CLOSED] Focal Point stips the word BY from the search
This is a Focal Point interface issue.

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,
February 22, 2010, 12:08 PM
Francis Mariani
How about explaining what you mean by "using variable BY fields"? Variable based on a selection in the launch form? GUI or coding? Software version?


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
February 23, 2010, 03:06 AM
Tony A
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.

T

This 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 
February 23, 2010, 08:27 AM
Don Garland
Thank you.
February 23, 2010, 09:16 AM
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


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
February 23, 2010, 06:52 PM
Doug
I see that Patricia answered your question about stripping the BY... However, I'd suggest another way, withot the -SET:
TABLE FILE CAR
SUM SALES
BY &SORT1.EVAL
END
This requires that the &SORT1 has a value even if it's FOC_NONE... Just a thought... And a freebie at that...
February 23, 2010, 06:56 PM
Doug
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? Music

BTW: The QUERY_BAND issue has been resolved and it works well within WebFOCUS.
February 25, 2010, 09:11 PM
Jim Morrow
I use qoogle to search FOCAL POINT. Just add site:informationbuilders.com to your search.


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



February 26, 2010, 04:17 PM
Francis Mariani
Brilliant, Jim!


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
February 27, 2010, 03:37 PM
Doug
I've done the Google search as well... But, that bekons the question: Why can't we do a similar search from within FocalPoint? New Feature Request?
March 01, 2010, 02:44 AM
Tony A
Doug,

To put it in your current industry terms -

Why can't cars built in America (generally) be driven from the right hand front seat? Wink

Not all site search engines are the same, and good luck getting "Social Strata" Forum software changed without paying "through the nose" for it!

T



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 
March 01, 2010, 09:10 AM
ABT
Wonder if Social Strata is powered by WebFocus? That seems a plausible reason 'By' would be skipped.

Not that that's a good excuse...


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
January 19, 2011, 03:06 PM
CeleryStalker
quote:
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';

DEFINE FILE PRC_MC_PATIENTMIX ADD
CodePrint/A35=PRC_MC_PATIENTMIX.ANSWERSET1.COST_CODE |' - ' | PRC_MC_PATIENTMIX.ANSWERSET1.DESCRIPTION;
&CHANGE_VALUE/P9.2M = PRC_MC_PATIENTMIX.ANSWERSET1.TOTAL_CHANGE.EVAL;

END
TABLE FILE PRC_MC_PATIENTMIX
PRINT

'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
January 19, 2011, 04:18 PM
Francis Mariani
quote:
no luck

What happens?


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
January 19, 2011, 04:24 PM
CeleryStalker
It sorts by highest throughout the entire report even though some values of TOTAL_CHANGE are less than zero.


WebFOCUS 7.6.11
Windows Server 2003
Excel, PDF and HTML
January 19, 2011, 05:15 PM
Dan Satchell
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
January 21, 2011, 12:24 PM
CeleryStalker
Thanks for the answer, Dan. I appreciate it.


WebFOCUS 7.6.11
Windows Server 2003
Excel, PDF and HTML