ORDERBY is not working for Lookup select box in service portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2018 09:34 PM
Hi Team,
I have one catalog item where in I am using one lookup select box variable. I want the choices to be sorted out based upon on the department field in the reference table I am using for lookup.
I have used below code in advance qualifier of this lookup variable
javascript:getRequestType()
and this is refering to script include
script include
function getRequestType()
{
var query = 'u_parent='+current.variables.Application_Component+'^u_active=true'+'^u_service_request=cc00174a4f252b404c73cf5d0210c7e3'+'^ORDERBYu_department';
return query;
}
This is working perfectly fine in internal servicenow. However, not working on service portal. Please help me to fix this issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2019 11:06 PM
My co-worker asked someone, and got this answer.
Looks like the setting change in UI Properties may have worked.
>1. Navigate to System Properties > UI Properties.
>2. Locate the property Allow base table lists (task, cmdb_ci, etc.) to include extended table fields (incident_state, os_version, etc.), and allow filtering on extended table fields (glide.ui.list.allow_extended_fields).
>3. Select the check box to enable extended fields on base table lists. Clear the check box to disable the feature.
>4. Click Save.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2021 09:54 AM
Do not do anything in the Variable Attributes section of the "Lookup Select Box", in place of that update the "Reference qual" of the varible as below--
ORDERBYu_sequence
where u_sequence should be your "Column Name" by which you want to short.