Reference Qualifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 02:17 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 04:41 PM
@felipe14 Yes, You can add variables to the reference qualifier condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 09:38 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 09:51 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 10:02 PM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader