List Collector in Service Portal

Talvin Singh1
Kilo Contributor

In CMS the 'list collector' variable has a left and right panel. But, the list collector does not work the same way in Service Portal. 

How can we filter the list collector based on another variable in Service Portal?

It would be great if you help me reach the solution.

Thanks in advance!

15 REPLIES 15

Brad Bowman
Kilo Patron
Kilo Patron

The list collector variable has a different appearance in the Service Portal vs the native UI, but it works the same way.  To filter the list of available records, use this syntax in the Reference qualifier field on the Type Specification tab of the variable definition.  This will work in Service Portal, and the native UI 

javascript:"group=" + current.variables.v_group

In this example my list collector is referencing the sys_user_grmember table, and I want to only show users that are in the group that I selected with my reference variable named v_group.

Talvin Singh1
Kilo Contributor

To add on, I also want the filtered values to populate in the list collector in Service Portal. Is there any way I can do this?

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can use advanced reference qualifier on that list collector variable

Also ensure you give this attribute in the variable attributes section

Example: if you have my_company variable which refers to company table

if you have user list collector variable which refers to sys_user table then it should be something like this

javascript: 'company=' + current.variables.my_company ;

ref_qual_elements=companyVariable

screenshot below:

Regards
Ankur

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

Hi Ankur,

I already have a variable with type-->'List Collector'. It is working absolutely fine and as expected in CMS.

Actions happening in CMS:

While selecting any value from 'Variable-1', a list of FILTERED values populated in 'variable-2' based on the condition.

I would want the same result in Service Portal. Please suggest.