Focal Point
[SOLVED] limiting dates displayed in drop down for date parameter

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

April 13, 2012, 05:42 PM
SPetrey
[SOLVED] limiting dates displayed in drop down for date parameter
I have a start date and an end date. I have a drop down for each and it shows all dates available back to 1991. I want to limit the date to more recent dates for the user to select from. I'm told it has to be handled in the source tab and not in the where/if area. How can I limit the dates available to 2005 and greater?

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


WebFOCUS 7.6
Windows, All Outputs
April 16, 2012, 07:13 AM
David Glick
You definitely do not need to do anything in the source. Just set the range appropriately.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
April 16, 2012, 09:47 AM
SPetrey
I saw the range option, but I want the user to be able to pull the most recent date available. If I select the most recent date today as the end of the range the new records wont be available next time will they?


WebFOCUS 7.6
Windows, All Outputs
April 16, 2012, 12:49 PM
Crymsyn
It sounds like you want to limit the dropdown list that users can choose from.

There are a few ways to do that the easiest though is to use the HTML Composer and on the drop down and filter what shows up.

If you don't want to deal with HTML Composer here is a post that may help.
http://forums.informationbuild...1060942?r=2551080942

If I am wrong and you want the dropdown list to still show everything but make sure users only select newer dates can use labels and gotos if they are before 2005:

-IF EDIT('&START_DATE','9999') LT '2005' OR EDIT('&END_DATE','9999') LT '2005' THEN GOTO LBLERROR ELSE GOTO LBLCONT;
-LBLERROR
-TYPE Must select dates from the year 2005 or later.
-EXIT

-LBLCONT


The above I am not able to test at the moment but should work. If the user enters one or both of the parameters with a date before 2005 it will not run the report and give the user the -TYPE message else it runs the report as normal. This would go before your first TABLE, DEFINE, or JOIN in your report.


WF: 8201, OS: Windows, Output: HTML, PDF, Excel
April 17, 2012, 07:20 AM
David Glick
The range can be relative so it changes as time changes.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
April 17, 2012, 10:45 AM
SPetrey
You are right Crymsyn that is exactly what i want to do. I am going to use the HTML composer and its calendar function to run the fex as some did in the link you provided. Thanks for your help with this.


WebFOCUS 7.6
Windows, All Outputs