- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2020 10:21 AM
I have a Lookup Select Box on a variable set on a Catalog item that calls a script include in a reference qualifier and passes in the value of the previous Lookup Select Box into the script include. This script include returns a string value that is the reference qualifier. It works fine in returning the correct values. However, the string includes an 'ORDERBY' value that I cannot get the qualifier to honor.
The u_version_sort_order value is an integer value in the table that is referenced by the Lookup Select Box.
I have tried putting the ORDERBY at the front and end of the string.
I have tried ORDERBYDESC in both cases just to make sure I was not confusing things.
I attempted to not include the ORDERBY at all and instead use the ref_ac_order_by attribute on the select box.
Neither of the options above caused a changed in the order of the available options in the select box.
The 'return' statement in the script include that is called:
return 'sys_idIN' + returnObject + '^ORDERBYu_version_sort_order';
EDIT:
The the lookup select box is always ordered ASC by the values returned, which is u_version_name in my table:
I am attempting to get it to order by a u_version_sort_order so that we can account for oddities when strings with alphanumeric values are sorted. In the example below, I intentionally jumbled the version order so that it would be obvious if the lookup select list is sorted or not in testing:
Solved! Go to Solution.
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2020 01:42 PM
I opened a Hi portal case for this. This is a known issue. You must switch the Type to Reference and use ref_ac_order_by in the variable attributes field.
https://hi.service-now.com/kb_view.do?sysparm_article=KB0695435
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2020 01:49 PM
I had seen the first one and attempted the ref_ac_order_by variable attribute but was unsuccessful. An attribute already existed in that field so I appended ',ref_ac_order_by=u_version_sort_order' at the end. No change in behavior.
I had not seen the second post but I have copy pasted my column name from my table multiple times. It would not hurt to attempt so again to be sure. I have been brought down my typos before.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2020 06:59 AM
I just verified my column name and copy pasted it into both the 'gr.orderBy' call as well as pasted it directly into the reference qualifier return. Neither had an effect. Thank you for the suggestion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2020 01:42 PM
I opened a Hi portal case for this. This is a known issue. You must switch the Type to Reference and use ref_ac_order_by in the variable attributes field.
https://hi.service-now.com/kb_view.do?sysparm_article=KB0695435
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 06:24 PM
you can set something like this in the reference qualifier of the Select Box variable:
javascript: 'ORDERBYname';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 06:24 PM
