We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Order By in Look up Select Box Reference Qualifier not working

Narasinhak
Tera Expert

I have a Lookup select Box.

I applied ORDERBY in reference qualifier. But its not working.

Below is the text from ref qualifier. What am I missing?

javascript:"persona=" + current.variables.persona.getDisplayValue()+"^device_type="+current.variables.computer_setup+"^exceptiondevice=false^isactive=true^ORDERBYsortsequence"

4 REPLIES 4

AnirudhKumar
Mega Sage

The last part of the reference qualifier is the problem.

ORDERBYsortsequence

 

Replace sortsequence with your field name.

for example, I have used serial_number for the orderBy: 

javascript:"persona=" + current.variables.persona.getDisplayValue()+"^device_type="+current.variables.computer_setup+"^exceptiondevice=false^isactive=true^ORDERBYserial_number"

@AnirudhKumar  sortsequence is the field name I created 😞

lol, I'm sorry.

Now I'm clueless.

Not applicable

You can write a SI and sort the result using orderBy and simply return the list. Call this SI in the reference qualifier.

This will definitely work.