Advanced Reference Qual w/ Javascript calls & Encoded String Query

ljschwaberow
Giga Expert

I am updating a reference qualifier I have that currently references the function of a script include, getPosition(). I want to add an encoded string query: u_position!=Not in use^u_position!=Default for Conversion^EQ. According to the Wiki: Encoded Query Strings - ServiceNow Wiki   the proper way to do this is:

javascript:'u_position!=Not in use^u_position!=Default for Conversion^EQ' + getPosition()

but currently only the encoded string query is working, the function is not longer working. Is there something wrong with my coding or syntax?

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Lindsey,



The best way to copy query is construct the filter form the list and then right click on the breadcrumb->Copy filter


Then javascript: copied filter


Please see the below screenshot attached for reference.


Screen Shot 2015-09-18 at 12.08.42 AM.JPGPlease check section 3.1 for more info.


http://wiki.servicenow.com/index.php?title=Using_Filters_and_Breadcrumbs



I hope this answers your question.


View solution in original post

4 REPLIES 4

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Lindsey,



The best way to copy query is construct the filter form the list and then right click on the breadcrumb->Copy filter


Then javascript: copied filter


Please see the below screenshot attached for reference.


Screen Shot 2015-09-18 at 12.08.42 AM.JPGPlease check section 3.1 for more info.


http://wiki.servicenow.com/index.php?title=Using_Filters_and_Breadcrumbs



I hope this answers your question.


Yes, thank you!


Mike Allen
Mega Sage

I think you need to remove the EQ:



javascript:'u_position!=Not in use^u_position!=Default for Conversion^' + getPosition()



It is not necessary.


Thank you Mike!