Reference qualifier not working on variable on portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2023 05:45 AM
Dear ServiceNow community, I hope all is well!
I am currently facing an incredibly annoying issue with a variable on a catalog item
I have a "Lookup select box" variable on a Catalog Item called "City" that is looking up its values from a custom table I have created, this variable needs to present choices based on a selection from another "Lookup select box" variable called "Project" which is also looking up its values from the same custom table.
I have built a reference qualifier to make sure that the "City" variable presents the values that have the selected "Project" against them in my custom table, here is my reference qualifier and data from both the custom table and the variables on the portal:
javascript:"u_project="+current.variables.project_1_12+"^ORDERBYorder";
As you can clearly see, although I have the "ORDERBYorder" clause added in my reference qualifier, it is being completely disregarded, the values are being sorted in a different manner than the order that I want and no matter what i try it is not working
I have tried creating a custom ordering field and using it but it did not work, I have also checked all the types of my fields on my custom table, the "order" field is an Integer and both the "Project" and "City" are of type Translated Text
What is also weird is that when I attempt using the ordering clause solely in my reference qualifier, it sorts the values by order, here is the syntax I used and how it affects in the portal:
javascript:"ORDERBYorder";
Any clue why this is happening and how I can fix it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2023 09:36 PM
Just curious if you are using custom table for lookup select box variable then order field is a custom field which should start with u_order.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2023 06:49 AM
Hello Tariq Alshara ,
can you please try Variable attributes field on that lookup variable ?
Hope this will work for you...!!!
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 06:40 AM
@Tariq Alshara did you get any solution/workaround ?