Advanced Reference Qualifier on Catalog Item Variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 08:26 AM
Hello -
I have 2 fields on a catalog item that both reference the same table (sys_user_group). The first field is a List Collector where they can select multiple groups. The second field is where I want them to select a default/home group, and is referencing the same sys_user_group table. However, I only want this second field to show the values that they selected from the first field within the List Collector.
I have added this advanced reference qualifier on the second field, however I get no results found even though I have multiple values selected in the first field:
javascript:'name='+current.variables.group_s_to_be_added.name;
group_s_to_be_added is the name of the variable on the first field with the list collector.
I have added the variable attribute: ref_qual_elements=name
I have done this successfully in the past, but not when both of the fields are referencing the same table, so I am not sure what I am doing wrong here.
Thanks!
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 08:30 AM
Hi,
please make this change to 2nd variable
javascript:'sys_id='+current.variables.group_s_to_be_added;
also do this
ref_qual_elements=group_s_to_be_added
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 08:34 AM
As groups is a list collector, wouldn't you need to do javascropt: 'sys_idIN' + current.variables.group_s_to_be_added; ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 08:55 AM
Thank you both! I did have to use sys_idIN to get it to work. However, it doesn't ever populate the first value I put in the list collector field. Strange! I can add a lot more and it will pick up on all those, but never the first one.
If I remove CAB Approval and then re-add it:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 09:06 PM
Hi,
it should show only those values present in 1st list collector.
it won't auto-populate directly.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader