Sorting numbers in Demand list view.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
What field is that? And what field type? I just checked on my (Zurich) instance on an integer field and it showed the expected order (20 on top, next one 6.0.3, etc). If it's a string field, it just checks the first character and orders by that.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @syGoC ,
This happens because the field you’re sorting on is being treated as text instead of a number. When ServiceNow (database) sorts string values, it sorts them alphabetically — so "9" comes before "89" and "91", which causes that strange order (91, 9, 89, 86, 8).
so .....
If the field type is String, change it to Integer , depending on your data.
Once it’s numeric, sorting will happen by actual value, not alphabetically.
If my response helped you, please mark it as the correct answer and close the thread. This way, others in the community can benefit too.
Regards,
TejasSN_LogicX
ServiceNow Developer | HackaNow Finalist | Community Contributor
📧 tejas.adhalrao11@gmail.com
🔗 LinkedIn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday