Discussions

 View Only
  • 1.  Sorting by date with empty dates

    Posted 08-31-2021 17:05

    The current sort for my report is by date, newest to oldest, and grouped by day.

    The default seems to be that if the date field is empty, this record shows at the very bottom of the report. 

    Is there a way to get the records with empty dates to show at the top of the report instead?



    ------------------------------
    Ashley Gwozdz
    ------------------------------


  • 2.  RE: Sorting by date with empty dates

    Posted 08-31-2021 17:16
    no problem,
    The field that you display on the report does not need to be the same field that you sort on. So just create a new formula date field called [Date Sort] with a formula of

    IF(IsNull([My Date Field]), Date(2099,01,01), [My Date Field])

    That will sort blanks as the most most current. 


    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Sorting by date with empty dates

    Posted 08-31-2021 17:48
    Thanks so much Mark! 

    I am getting an error on this code. Is there something missing? 

    "Expecting text but found date"



    ------------------------------
    Ashley Gwozdz
    ------------------------------



  • 4.  RE: Sorting by date with empty dates

    Posted 08-31-2021 17:56
    This would be a date so change the field type to be formula date.

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Sorting by date with empty dates

    Posted 08-31-2021 18:29
    Oh, I've got it working now. Thanks Mark!!

    ------------------------------
    Ashley Gwozdz
    ------------------------------