Focal Point
[SOLVED] Drop down box sort by highest date not on an HTML page.

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

March 04, 2020, 04:13 PM
Nelsont
[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);


In my example ORDER DATE is HYYMDs


WebFOCUS 8206, Unix, Windows
March 04, 2020, 07:31 PM
Hallway
Check out the docs: Adding a Dynamic Multiselect List of Values in Descending Sort Order


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
March 05, 2020, 02:53 PM
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.

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.;



Hallway

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