Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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.

Prathamesh1
Giga Guru

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.