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] "All" static value in Drop down list

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] "All" static value in Drop down list
 Login/Join
 
Member
posted
All,

I have been tasked to modify an inherited report to include in the drop down list of the html page an "All" value.

This list consists of static values which are generated in the "Define" section of the procedure. The define is along the lines of:

IF location EQ 'A' THEN 'value1' ELSE IF location EQ 'B' THEN 'value2' ELSE IF location CONTAINS 'C' OR 'D' THEN 'value3'...and so on.

Any ideas on how to Get an "All" value in the drop down list which will bring back all values for all these locations?

Thanks,
Craig

This message has been edited. Last edited by: cevans,
 
Posts: 23 | Location: ABQ, NM | Registered: August 24, 2009Report This Post
Gold member
posted Hide Post
Within the
 <SELECT> 
tag, just place this
 <OPTION> 
tag:
 <option value="$*" selected>ALL </option> 


Drop-down will now show the ALL option, which will be passed to the (report) code with a value of '$*', which can be checked for.


WebFOCUS 8105
Windows;
DB2, UDB, SQL Server, Oracle
FOCUS-WebFOCUS since 1981
 
Posts: 84 | Registered: December 13, 2005Report This Post
Virtuoso
posted Hide Post
Using the painter, when you the the ALL option it passes a value of FOC_NONE. This is a key word the FOCUS uses to ignore the line on which it is found. So if the display is "ALL" and the value is "FOC_NONE" then the FOC_NONE value gets passed the the line WHERE fieldname EQ value and the selection line is ignored, essentially retrieving all values.

One question that I did have based on your description, is are you using a DEFINEd field in your selection criteria? That should be avoided if at all possible as it causes a complete table scan. You should stick to real fields for selection criteria.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Member
posted Hide Post
Thanks for the responses!

Microfich, I did what you said (well, from the front end as I am not a code guy) and it worked! I knew it had to be something relatively simple. I just added a static value with the value of $* and a display of All and got the data I wanted. (Will have to spot check but looks like the number I was expecting.)

One question for you though:

The report has in its Page Heading...&PROCESS. (PROCESS being the Define filed with the static values) As it is now I am getting the results I desire but with a heading telling the user they ran a report for "$*" processes and not "All" processes. Any ideas how to get the word "All" up there?

Thanks,
Craig
 
Posts: 23 | Location: ABQ, NM | Registered: August 24, 2009Report This Post
Member
posted Hide Post
Darin,

I tried using FOC_NONE in for the value but the query was taking so long I figured it eliminated the where clause completely or something as it seemed it was going to return far too much.

I am using a defined filed in the where clause of this report. I inherited this report so maybe I would have figured another way to accomplish the report, maybe not. I am just not trying to re-invent the wheel for this report and just work with it how it is.

I will definitely keep the tip in mind for future reports I create though.

Thanks,
Craig
 
Posts: 23 | Location: ABQ, NM | Registered: August 24, 2009Report This Post
Expert
posted Hide Post
FOC_NONE will eliminate the whole line it appears on. If you have a compound WHERE statement that is coded on one line, the whole statement gets ignored.


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
Thanks Francis and Darin,

I see what you guys mean now. It was a fairly large where statement which was all entered on the same line. I made it like below and used the FOC_NONE method and it worked:

WHERE
PROCESS EQ '&PROCESS' AND
this EQ that AND this LE that and etc...

It oddly eliminates the heading section saying "report ran for: "&PROCESS'" I guess that is all good though since that heading really only needs to be there when choosing a single area as the full report implies "All areas"

Thanks for the help everyone!
 
Posts: 23 | Location: ABQ, NM | Registered: August 24, 2009Report This Post
Expert
posted Hide Post
quote:
FOC_NONE will eliminate the whole line it appears on
even HEADING lines...


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
did not even think of that Francis. durrr...lol

thanks!
 
Posts: 23 | Location: ABQ, NM | Registered: August 24, 2009Report 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] "All" static value in Drop down list

Copyright © 1996-2020 Information Builders