Focal Point
[SOLVED] Date in the PAST

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

April 13, 2018, 03:52 PM
ratios
[SOLVED] Date in the PAST
Hi Fellow Focus users! Happy Friday.

In the new 8202M Page layout, when a calendar is setup, how can I set the default date to be a date in the past? See image

I use
 WHERE [tablename] GE &STARTDATE.(|FORMAT=YYMD).From Date:.QUOTEDSTRING; 
to tell the page I need a calendar. I just don't know how to say I would like the FROM DATE to initially show a date in the past. It always shows today's date.

Any help appreciated. Thank you!

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS App Studio 8202M
Windows, All Outputs
April 13, 2018, 06:06 PM
CoolGuy
Try adding a
-DEFAULTH &STARTDATE = '20180410';
to the top of you fex file with that WHERE statement in place.


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
April 16, 2018, 10:02 AM
ratios
Thanks CoolGuy but that doesn't work. Once you put the "H" it removes the calendar altogether so that at runtime the calendar is not visible.


WebFOCUS App Studio 8202M
Windows, All Outputs
April 16, 2018, 12:28 PM
CoolGuy
What do you get without the H (-DEFAULT)? Also, what happens with a -SET?


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
April 16, 2018, 12:49 PM
Hallway
It should work with a -DEFAULT, however the default date value needs to be an alpha date

  
-DEFAULT &BEG_DATE = 'April 01 2018';
-DEFAULT &END_DATE = 'April 07 2018';

-TYPE &BEG_DATE.(|FORMAT=YYMD).From Date.
-TYPE &END_DATE.(|FORMAT=YYMD).To Date.


A fex with just the code above and I get this:



Or after combining the two date inputs I get this:




Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
April 16, 2018, 03:16 PM
ratios
Thanks Hallway! The alpha date did the trick! It works!

Just curious... what is the fex for the combined date?


WebFOCUS App Studio 8202M
Windows, All Outputs
April 16, 2018, 03:35 PM
Hallway
No fex needed. It is done in the Page Designer. With both of the date controls selected, just right click and select combine.




Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs: