- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2024 06:34 AM
Hi All,
I have an advanced ref qualifier and I am calling a SI
Javascript:new NewIPC().getIPCServersForCurrentUser(current.variables.req_for);
In my SI I am not sure how to receive or map the var req_for. I am only trying this because in my AJAX call it return the expected values but also other record form the CMDB_CI and I am not quite sure why.
Any input appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 06:17 AM
I missed earlier that it looks like you are capitalizing the J. It's hard to tell with this editor substitutions, but it should look like this:
Confirm the reference table for this variable is cmdb_ci_server, and that have a variable named req_for that is a reference to sys_user, then you should see the selected user sys_id logged in the Script Include. If the logic in the SI is correct, you should see the correct records logged before the return, then the same should show in the list on the reference variable. None of this is using or requires AJAX or a Catalog Client Script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 06:17 AM
I missed earlier that it looks like you are capitalizing the J. It's hard to tell with this editor substitutions, but it should look like this:
Confirm the reference table for this variable is cmdb_ci_server, and that have a variable named req_for that is a reference to sys_user, then you should see the selected user sys_id logged in the Script Include. If the logic in the SI is correct, you should see the correct records logged before the return, then the same should show in the list on the reference variable. None of this is using or requires AJAX or a Catalog Client Script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 06:27 AM
omg, I am so glad I have you, now it works. I just didn't see the big J

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2024 06:48 AM
Hi,
Suggest you not to use same function for GlideAjax and Ref qualifier as the input parameters are passed differently for GlideAjax and Ref Qualifier.
Within Script include create new function with parameter as required. Use this parameter in you script. Share the script include if you have any confusion, I can help you to fix it
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2024 07:19 AM
Please see code above in answer to Brad. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2024 07:07 AM
you can use same script include function to be used from ref qualifier and ajax, but it requires a tweak
this link talks about the same and @Brad Bowman has shown the approach
Script Function Available to BOTH Client side and Server side Code?
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