Orderby for look up select box
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2025 04:24 AM
Hello developers, i have a scenario where a variable which is lookup select box loading the custom table records needs to sorted by order.
Here is order is a column("u_order" which is integer) in that custom table . so based on u_order the list records has to be sorted .
In variable attributes of the field i gave ref_ac_order_by=u_order which is not workn . can anyone know what the issue here is. Any help is appreciated. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2025 10:44 PM
Will try this one as well and let you know how it goes.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2025 11:54 PM
simply add this at the end and see if that works
javascript: new ScriptInclude().function() + '^ORDERBYu_order';
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
‎04-09-2025 12:36 AM
Hello @Ankur Bawiskar : Thanks for your response, this didnt work , i added the same .
javascript: new ScriptInclude().function() + '^ORDERBYu_order';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2025 12:39 AM
what happens if you simply keep the ORDERBY?
Does it order using that 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
‎04-08-2025 04:56 AM
this older link talks about the same, use the ref qualifier as this and see if that works
javascript: 'ORDERBYu_order';
Reference qualifier "ORDERBY" and javascript does not work
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