Display values in a particular order from a lookup select box in RP on portal

Vaibhav11
Kilo Contributor

Can someone explain how do we get values in a lookup select box in a particular order.

1 ACCEPTED SOLUTION

Shubham Tipnis
Kilo Sage
Kilo Sage

Hi Vaibhav,

 

By particular order you mean in a sorted order I suppose. If that’s the case then just add below line of code in the Reference Qualifier of the lookup select box

 

javascript: 'ORDERBYu_order' //replace u_order by the field by which you want to sort the values.

find_real_file.png

 

Regards,
Shubham

Regards,
Shubham Tipnis
 ServiceNow Enthusiast
️ 3x Rising Star (2022–2024) – ServiceNow Community
 Sharing insights, use cases & real-world learnings from the Now Platform
 Always learning. Always building.

View solution in original post

2 REPLIES 2

Shubham Tipnis
Kilo Sage
Kilo Sage

Hi Vaibhav,

 

By particular order you mean in a sorted order I suppose. If that’s the case then just add below line of code in the Reference Qualifier of the lookup select box

 

javascript: 'ORDERBYu_order' //replace u_order by the field by which you want to sort the values.

find_real_file.png

 

Regards,
Shubham

Regards,
Shubham Tipnis
 ServiceNow Enthusiast
️ 3x Rising Star (2022–2024) – ServiceNow Community
 Sharing insights, use cases & real-world learnings from the Now Platform
 Always learning. Always building.

Hello,

I tried this it does not work.   There is a KB where SN says they will not support Lookup Select Box sorting if it is a dependent variable.  https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0695435