
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2017 02:53 AM
Hi,
I need to order a list of tasks on a date field in Ascending order.
By using the orderBy('date_field') the the tasks without a value for the date_field, will be ordered on top. I want to have these tasks at the end of my resultset.
Anyone for a solution?
Michiel Meijler
ServiceNow Developing Consultant
Odysseus Group
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2017 05:07 AM
You need to split these into 2 gliderecords. One with null and one without.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2017 05:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2017 05:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2023 09:29 AM
Ok - this is a little old - but I have the same requirement. Although I needed to be able to page through the record, using "chooseWindow".
I ended up creating a "date_field_sort" field and using a Business Rule (Insert, Update) to either put the value of "date_field" or a high date value into the "sort" field.