List Collector in Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2020 04:56 AM
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!
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2020 05:42 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2020 05:53 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2020 05:53 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2020 08:35 AM
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.