Can you change the reference qualifier on a field using a client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2019 06:24 PM
Hello all.
I need to change a reference qualifier so that the refence shows all the applications from the application table on a catalog task in my workflow. Currently it is only showing the applications which are related which I filtered on the form display.
Any way I can do this? I can even call my script include with an empty parameter so it returns all the values but it doesn't matter if it is not using a reference qualifier.
Help would be greatly appreciated!
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2019 07:11 PM
Please see solution below
https://community.servicenow.com/community?id=community_question&sys_id=fa338be1dbd8dbc01dcaf3231f961923
Regards,
SAchin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2019 07:18 PM
hey Sachin,
I checked this out.
This is the code I currently have in an if statement in my workflow. The portion in the if statement is not working as intended.
answer = new findApps().checkRelationship(current.variables.ref_ci, current.variables.ref_app);
if(!current.variable.ref_app)
{
current.variables.ref_app = new findApps().findAppsInRelationship("");
}
According to the post you linked just adding a javascript: would fix this?
Thanks, Pranav.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2019 07:20 PM
Also as an addendum, the reason my case differs is because this is after submit of the form. I am able to use an advanced reference qualifier when the user is still submitting the form.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2024 07:54 PM - edited 06-23-2024 07:54 PM
this article worked for me:
How to modify Reference Qualifiers with Catalog Client Scripts – ServiceNow – ServiceNow Think (word...
and this is the onChange client script: