
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2018 01:56 AM
Good morning,
We have a section on our ServiceNow instance where users can select a training course from a dropdown list, in this case Excel.
Currently the Lookup Select box has a reference qual containing u_type=excel so it filters on Excel only which refers to the IT training table:
The training table's choice list shows the courses and lists them with a sequence value as well as a label (just the Excel ones shown for reference):
However, when a user is using the service portal, the drop down list is sorted by the Value rather than the sequence, so labels appear in that order, instead of in the sequence order which is preferred. I did try to add ^ORDERBYsequence to the end of the reference qualifier but that failed to change anything.
Although the values could be changed to be set alphabetically, would this impact on users who have already filled out the forms and selected a course where they've created a requested item already? Or is there a way to ensure the order by is by sequence, so if more are added in future, we can always set the sequence order accordingly?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2018 02:27 AM
So I was able to resolve my own problem, it was a case of instead referencing the sys_choice table directly, but filtering out based on the dependent value being excel (effectively what the u_type field is set to):
So by ensuring that the value is the course field selected, with the label showing on screen as to which to be selected, it was then a case of narrowing down in the reference qual.
The element u_course is only used for IT training, although I could also add that in to the reference qual if it wasn't.
This then shows the courses in the order of sequence in the drop down list:
And if I change the sequence order, this order also changes, which is the behaviour we'd like.
Just in case anyone else happens to need this, hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2020 12:21 AM
Hi Warren,
Hope you are doing well,
I need help. I want the same as your encountered.
Please help me to concat the your 'Sequence Logic' in below syntax,
ref qual -- javascript:'u_region='+current.variables.custom_region;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2020 06:11 AM
hello Vivek/Warren,
I too have a similar requirement.
Can you please help on how to concat the your 'Sequence Logic' in below syntax,
ref qual -- javascript:'u_region='+current.variables.custom_region;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2020 10:16 PM
do you have any column on your table which will define the sequence ? if yes then you can use order by
eg:
ORDERBY<fieldName>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2020 11:30 PM
In that case what will be syntax in ref qual - javascript:'ORDERBYsequence^u_region='+current.variables.custom_region;
the above is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2020 11:48 PM
ref qual -- javascript:'u_region='+current.variables.custom_region+'ORDERBYu_order';
have you try this,