[SOLVED] Drop down box sort by highest date not on an HTML page.
If you run the code below a drop down box comes up with date of 1996/01/01 as first date and 1997/12/01 as last date . Running this directly from the fex and not putting it on a HTML page can you change the sort of the where so the first date is 1997/12/01 and the last date is 1996/01/01?
TABLE FILE GGSALES SUM DOLLARS BY DATE WHERE DATE EQ &SEL_DATE.(FIND DATE,DATE IN ggsales).Select Date.; ON TABLE NOTOTAL END
I was thinking of changing the where to something like WHERE DATE EQ &SEL_DATE.(FIND HIGHEST DATE,DATE IN ggsales).Select Date.;
That did not work.This message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS Dev Studio 8105m
March 04, 2020, 04:56 PM
BabakNYC
I think the syntax is SORT=DESCENDING, something like this:
WHERE ORDERS.ORDERS.ORDERDATE EQ DT(&ORDERDATE.(FIND ORDERS.ORDERS.ORDERDATE IN IBISAMP/ORDERS |FORMAT=HYYMDs,SORT=DESCENDING,REQUIRED=TRUE).Order date:.QUOTEDSTRING);
That worked perfectly for what I was doing as the table I'm using only has current date back.
What if your dates go from 1/1/2003 to 12/31/2034. Can you set this to current date just running the fex not putting it on an html page.This message has been edited. Last edited by: Nelsont,
WebFOCUS Dev Studio 8105m
March 06, 2020, 01:18 PM
FP Mod Chuck
Nelson
The calendar control has a check box in the settings to use current date.
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
March 12, 2020, 08:04 PM
Hallway
quote:
Originally posted by Nelsont: That worked perfectly for what I was doing as the table I'm using only has current date back.
What if your dates go from 1/1/2003 to 12/31/2034. Can you set this to current date just running the fex not putting it on an html page.
Not in an auto-prompt scenario. At least not that I know of.
If you're using dates, why not use the datepicker?
WHERE DATE EQ &SEL_DATE.(|FORMAT=YYMD).Select Date.;