Make reference varible list in alphabetical order
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2016 06:50 AM
Hi,
How do I make a reference variable list show in alphabetical order by default?
I'm assuming this is a variable attribute but i don;t know what attribute to use.
Thanks in advance!
- Labels:
-
Instance Configuration

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2016 08:57 AM
ref_ac_order_by: is the variable attribute to use. Section 19 wiki: Variable Types - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 01:55 AM
HI,
I added the following to the variable attributes field but it hasn't made any difference to the order.
ref_ac_order_by=name
Is this right?
Thanks for your help
Emma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 02:33 AM
I faced the same issue. I overcame by creating a query business rule on the looked up table.
But if you do the same you will have to be careful that the query br runs only when the request comes from reference field's lookup and no where else.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2023 10:26 AM
Hi Anurag,
Thanks for the insights on this, I created a query business rule to sort the records order based on the creation date.
This is the query BR:
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
current.orderByDesc('sys_created_on');
})(current, previous);
Question: How would you add the trigger condition for this BR, if the trigger is coming from one of the catalog items reference fields.
BR's only run on specific tables right?
Thanks,
Naren