Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Advanced Reference Qualifier on Catalog Item Variable

jlaue
Mega Sage

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.  

find_real_file.png

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!

 

 

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

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

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

As groups is a list collector, wouldn't you need to do javascropt: 'sys_idIN' + current.variables.group_s_to_be_added; ?

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.

find_real_file.png

 

If I remove CAB Approval and then re-add it:

 

find_real_file.png

 

 

 

Hi,

it should show only those values present in 1st list collector.

it won't auto-populate directly.

Regards
Ankur

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