- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2025 06:58 AM
I want to sort the Choice table but I dont want have to enter a value on Sequence and then sort by Sequence. Can I use an attribute to sort by label or value?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2025 07:09 AM
In ServiceNow, the Choice table (sys_choice) does not support automatic sorting by label or value using an attribute on the field. By default, choices are ordered by the sequence field. If sequence is blank, records are generally sorted by label, but this is not guaranteed or configurable via a field attribute.
Otherwise, you can:
1. override choice list with a client script (not recommended for standard fields)
You can technically override choice order via a client script, but this is fragile and not recommended unless you're dealing with a custom dropdown.
2. Use a reference field instead
If you truly need auto-sorted dropdowns without managing sequence manually, consider using a reference field to a custom table (e.g., u_choice_options) where you can sort by name or order naturally.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2025 07:09 AM
In ServiceNow, the Choice table (sys_choice) does not support automatic sorting by label or value using an attribute on the field. By default, choices are ordered by the sequence field. If sequence is blank, records are generally sorted by label, but this is not guaranteed or configurable via a field attribute.
Otherwise, you can:
1. override choice list with a client script (not recommended for standard fields)
You can technically override choice order via a client script, but this is fragile and not recommended unless you're dealing with a custom dropdown.
2. Use a reference field instead
If you truly need auto-sorted dropdowns without managing sequence manually, consider using a reference field to a custom table (e.g., u_choice_options) where you can sort by name or order naturally.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2025 07:15 AM
Hi,
ServiceNow doesn't offer a built-in attribute for sorting choices by label or value directly within the Choice table. To accomplish this, significant custom development is required. If you're still interested in pursuing this, please let me know so I can start working on a solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2025 07:19 AM
Service Now does not provide a built-in attribute to sort choices by label or value directly in the choice table. So in order to achieve this you will need to do lot of custom development. If you are still willing to move ahead you can reply so that I can work on solution.