How Can I Order the Variable Name Choices in a Catalog Item Reference Qualifier on Service Portal

WazzaJC
Tera Expert

How Can I Order the Variable Name Choices within a Catalog Item Reference Qualifier Javascript

 

Dear ServiceNow Community Colleagues,

 

I am using a Lookup Select Box variable, on my catalog item, due to having variables that are dependent on another (Select Box) variable.

 

In this case, the Lookup Select Box variable is 'Functional Area' and it has a dependency on a Select Box variable, called 'Platform/Account'.

 

I have attached full screenshots for guidance, including my existing Reference Qualifier javascript, that creates the dependency.

 

My question is: what would be the adjusted Javascript to use, so as to OrderBy (show in alphabetical order) the 'platform_account' names that are presented on Service Portal, using this Lookup Select Box variable.

 

Please could I request advice/guidance on what is the adjusted Javascript I need to use within Reference Qualifier, to OrderBy 'platform_account' (which is the main Select Box variable).

 

All screenshots are attached, showing my existing configuration.

 

Many thanks for any help on achieving this.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@WazzaJC 

try this

give the field name based on which you want to order by

javascript: 'ORDERBYfieldName' + 'u_platform_account=' + current.variables.platform_account

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

8 REPLIES 8

ok.

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Hi @WazzaJC 

please use this and check

javascript:'u_platform_account=' + current.variables.platform_account + '^ORDERBYdesc'

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Thanks @Tanushree Maiti still not working for me, but I will keep trying.

Ankur Bawiskar
Tera Patron

@WazzaJC 

try this

give the field name based on which you want to order by

javascript: 'ORDERBYfieldName' + 'u_platform_account=' + current.variables.platform_account

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader