Is it possible to sort ASC and have records with empty values last?

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

Using the sdk, I sort by a date field ASC. Records with empty values show first. Is it possible to sort by ASC and have the records with empty values last?

Photo of Micah


  • 0 Points

Posted 4 years ago

  • 0
  • 1
Photo of Scott


  • 334 Points 250 badge 2x thumb
Hi Micah,

Unfortunately, no.  However, there is a work-around you can do to accomplish what you are asking.  Here's an example of what I mean.

Say your field name you want to sort ASC by is called "Name".  Create a formula - text field called "Name*".  For the formula write one of the following:




Either will accomplish what you're looking for.  Next, on the report you would like to sort on, click "Customize this Report".  Scroll to the sorting and grouping section at the bottom and choose "Name*" and sort by ASC.  Click Save.

This will sort by the "Name*" field, which will put all empty fields last, while still showing the fields as empty on the report because the report will show the "Name" field and not "Name*".

Hopefully my work-around was helpful and accomplishes what you're looking for.