Reference Qualifier

felipe14
Tera Contributor

I need to create a referen qualifier that I can use to make queries based on the id_intragov variable or the id_vivo variable

 

my example: javascript:'u_access_id'=current.variables.id_vivo^ORu_id_intragov=current.variables.id_intragov^EQ

the query will be made in cmdb_ci_network_link

 

this is possible?

4 REPLIES 4

Dinesh Reddy By
Kilo Sage

@felipe14  Yes, You can add variables to the reference qualifier condition

Rishiraj14
Giga Expert

No with the code mentioned by you it will not work as you are using "current" keyword which is referring to the data stored in the table which is from server database but here you are querying to appear in the form, therefore instead of that current, either you can create a variable in the form and set the default values using onLoad script and GR method and then use the g_form.getValue('variable_name'); method to fetch that data so that it can query accordingly, try this hope it helps.

If you find it helpful, please hit the helpful button.

shantanu_patel8
Mega Guru

Hi @felipe14 ,

 

You can use the following in the reference qualifier : "javascript:'u_access_id='+current.variables.id_vivo+'^ORu_id_intragov='+current.variables.id_intragov"

 

Please mark the answer helpful and correct if it resolves the issue. Happy scripting 

shantanu_patel8_0-1747284683310.png

 

 

-Shantanu

Ankur Bawiskar
Tera Patron
Tera Patron

@felipe14 

you are using the wrong syntax, this is the correct one

javascript:'u_access_id=' + current.variables.id_vivo + '^ORu_id_intragov=' + current.variables.id_intragov;

If my response helped please mark it correct and close the thread so that it benefits future readers.

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