- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago - last edited 5 hours ago
How Can I Order the Variable Name Choices within a Catalog Item Reference Qualifier Javascript
Dear ServiceNow Community Colleagues,
I am using a Lookup Select Box variable, on my catalog item, due to having variables that are dependent on another (Select Box) variable.
In this case, the Lookup Select Box variable is 'Functional Area' and it has a dependency on a Select Box variable, called 'Platform/Account'.
I have attached full screenshots for guidance, including my existing Reference Qualifier javascript, that creates the dependency.
My question is: what would be the adjusted Javascript to use, so as to OrderBy (show in alphabetical order) the 'platform_account' names that are presented on Service Portal, using this Lookup Select Box variable.
Please could I request advice/guidance on what is the adjusted Javascript I need to use within Reference Qualifier, to OrderBy 'platform_account' (which is the main Select Box variable).
All screenshots are attached, showing my existing configuration.
Many thanks for any help on achieving this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
try this
give the field name based on which you want to order by
javascript: 'ORDERBYfieldName' + 'u_platform_account=' + current.variables.platform_account
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @WazzaJC
please use this and check
javascript:'u_platform_account=' + current.variables.platform_account + '^ORDERBYdesc'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Thanks @Tanushree Maiti still not working for me, but I will keep trying.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
try this
give the field name based on which you want to order by
javascript: 'ORDERBYfieldName' + 'u_platform_account=' + current.variables.platform_account
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
