Catalog Variable "Select Box" Using Choice Table - How to Alphabetize the List (not choice list)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2025 08:58 AM
I have a variable used on my incident record producer for users to pick the application from a list they are having trouble with. This list is derived from the BUSINESS APPLICATION table where a field there indicates to be included or not. I have a request to have the list be alphabetized... but I see no way to do this. What am I missing, or what options do I have?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2025 09:17 AM
Hi,
In Variable attributes type the below value:
ref_ac_order_by=<name of the sorting field>
Refer below URL for more details:
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2025 09:17 AM
try to add this in reference qualifier
ORDERBYsequence
I was able to order it based on sequence for Category field
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2025 10:20 AM
This does not seem to work, I think because the list is not generated from a sys_choice table, but from the Business Application table directly. Or I am not doing it right,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2025 10:33 AM
So on this record producer, there is a catalog client script that seems to be doing things. Not sure if I can add a sort into this onChange catalog client script?
function onChange(control, oldValue, newValue, isLoading) {
if (newValue == oldValue) {
return;
}
// clear options and add -- None -- option back
g_form.clearOptions('specify_issue_item');
g_form.clearOptions('u_user_selected_app_ba');
g_form.addOption('specify_issue_item', '', '-- None --');
var ga = new GlideAjax('getIncidentTypes');
ga.addParam('sysparm_name', 'getIncTypes');
ga.addParam('sysparm_incType', newValue);
ga.getXMLAnswer(itemTypes);
function itemTypes(answer) {
var typeData = JSON.parse(answer);
for (i = 0; i < typeData.ids.length; i++) {
g_form.addOption('u_user_selected_app_ba', typeData.ids[i], typeData.apps[i]);
}
}
}