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.

Reference qualifier for Reference Variable using value in a List Collector Variable

Andrew Winter
Tera Contributor

HI ServiceNow Community,

I have a requirement to filter a Reference variable within a Service Catalog request from the values which are selected in a List Collector variable. 

Both the Reference and List Collectors variables are on the sys_user table. The users in the List Collector Variable are filtered to display only users who are listed as a Manager within the sys_user table. I would like to use the values from the List Collector in a Reference Qualifier for the Reference variable, to only display users who have the selections from the List Collector as managers on their user records.

I am sure I have done this in the past, however I am slightly stumped and cannot remember how I did this last time.

Thanks,

4 REPLIES 4

Mohith Devatte
Tera Sage
Tera Sage

HELLOW @Andrew Winter ,

Can you try this ?

javascript:"sys_idIN"+current.your_list_collector_field_name;

PLEASE MARK MY ANSWER CORRECT IF IT HELPS YOU

 

Andrew Winter
Tera Contributor

Hi Mohith, 

Thanks for the reply. That is close to what I have been trying, however I am still getting no matches found on the reference variable.

@Andrew Winter can you send your script or the line you pasted please?

I tried what you had above javascript: "sys_idIN"+current.mvr_director;, also tried javascript: "sys_idIN"+current.variables.mvr_director; javascript: 'manager.sys_idIN'+current.variables.mvr_direcor; as well as a number of different permutations.