Custom sort/order list in Reference Qualifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2016 11:21 AM
Hi,
I'm working on a requirement where I need to order/sort list data in a certain sequence on a reference field. The reference field refers to User table and an advance reference qualifier pulls users in the required sequence and returns an array of sys_ids.
The problem is displaying this custom sequence. But when I return an array of sys_ids, the sequence of records is gets overridden by the sort sequence used to display lists in service-now(Controlling the Sort Sequence Used to Display Lists - ServiceNow Wiki)) . Is there a way to display custom ordered list in reference qualifiers ? If not, Any alternatives to achieve this ?
Thanks !!
- Labels:
-
User Interface (UI)
- 4,142 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2016 01:28 PM
Hi Reach,
Sorry, you cannot impose your will on the masses. 🙂
The field and order (asc/desc) is a user preference. The best you'll get is to set a default for that particular list/view, but the user is free to override it (which also saves to their user preferences) as soon as they click a column heading on that list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2016 01:51 PM
Hi ctomasi,
Thanks for responding.
Setting default doesn't meet the requirements, since it is either asc/desc on any field. The result that I'm pushing into the sys_id array is the combination of whole matrix that I need.
Example : Array has something like this starting from index 0 to array.length-1 :
- Frst all users with the same department of the user on the current record
- These users are further sorted in the array based on their EmployeeIDs.
- Second all users in other departments within the same user Region(AMS,EMEA etc) on the current record
- These users are further sorted in the array based on employee's location .... and so on.......
Thanks,
Reach !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2016 01:48 PM
If this is a list on a reference list, look at changing the reference completer and try using the No sort internationalized attribute
Auto-Complete for Reference Fields - ServiceNow Wiki
May work - not sure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2022 10:37 AM