Service Portal - Lookup Select Box - Choice Ordering

Han Jie1
Kilo Explorer

Good Morning Community, 

I recently came across this and got stumped so any and all assistance would be highly appreciated. I looked through the community and couldn't really find anything. 

System Background: 

  • We are currently using Kingston and will be upgrading to Madrid within the next month or so 
  • I am working within a custom scoped application - it's pretty developed at this point so its layered with OOTB and customization [however none of the custom changes should impact this question]

Question: How do you sort choices on a lookup select box variable found in our record producer? 

What Happens/Exists Now

Currently we have a record producer within the custom app with a variable set 'XYZ' with multiple non-related lookup select box variables that reference a custom choices table. 

This custom choices table has an element field, label field, etc. and a custom u_order field. 

We provided orders for each of the relevant choices and a reference qualifier in the type specification for each lookup select box variable. 

Example) REF QUAL: ORDERBYu_order^element=xyz 
Note: I tried different variations to this, added EQ, different orders, etc. 

Right now when you first load the form on the Service Portal the order is honored and everything works as it should; however, the moment you start toggling through values and selecting it seems to break and resorts the choices in OOTB alphabetical order. 

The stranger part is that it seems to work on one variable perfectly fine and no where else. And we tried remaking them, etc., they all look the same except question name and the element it is referencing.  

 

Thank you!

2 REPLIES 2

Stacy1
Mega Guru

I recently had a similar issue.  I created an order field 'u_order' on my custom table and ordered it the way I wanted it and then used my reference qualifier on my variable: active=true^ORDERBYu_order.

Hope this help.

Thanks,

Stacy

Good Morning Stacy, 

 

Thanks for the response!

Unfortunately that SHOULD work and I tried all variations of that.

Ultimately, I put out a HI ticket to ServiceNow and they responded fairly vaguely that it was a bug/problem they were working on and that it would be fixed in the Madrid release. 

 

Supposedly the fact that the reference qualifier worked on certain variables and not on others was a Kingston (and below) bug. 

 

Best Regards, 

Han Jie