The CreatorCon Call for Content is officially open! Get started here.

Gunjan Kiratkar
Kilo Patron
Kilo Patron
Hello Community Experts,

 

While working with the List Collector on Catalog Item, I came across a strange behaviour of the list collector as it it is working as expected in portal but when I tried it from backend it is not showing me the values as expected.

 

Problem Statement : I have two fields, 1) Select Group 2) Select Group Members . Whenever any user selects Group from first field then show the group members for that particular Group on 2nd field and that field must be the list collector to select multiple group members.

 

Implementation :  Created two variables as below :-

 

GunjanKiratkar_0-1668323654485.png

 Fig. Variables

Reference Qualifier on "Select Group Member" variable :-

GunjanKiratkar_1-1668323803522.png

 

Fig. Reference Qualifier

Testing : 

From Portal :- Working as expected.

 

GunjanKiratkar_2-1668324030094.png

 

 Fig. List Collector From Portal

From UI16/Backend: 

Not getting the Group Members as expected.

 

GunjanKiratkar_3-1668324206371.png

Fig.List Collector from UI16

Solution:-

Go to the List Collector variable and add variable attributes for that variable as below :-

 

GunjanKiratkar_4-1668324826615.png

Fig. Variable Attribute for List Collector

 

ref_qual_elements=<name of dependent reference variable, for example,select_group  as in the above-mentioned scenario>

 

Testing :-

From UI 16:- Values are populating as expected.

GunjanKiratkar_5-1668325071798.png

Fig.List Collector from UI16

 

If You think this article added value in your ServiceNow Knowledge then please mark it as helpful and bookmark it for future reference. Share it with your friends. 🙂

 

Thanks & Regards,

Gunjan Kiratkar

ServiceNow Developer

ServiceNow Community Rising Star 2022

Comments
sravani thota
Tera Explorer

Hello Community Experts,

 

 

sravanithota_1-1705469462879.png

 

With the above code i am getting below results in List Collector can you please help me how to get the usernames in List collector instead of created date

 

sravanithota_0-1705469406563.png

Thanks,

Sravani T

 

dheeru_1994
Tera Contributor

did you write any script to get this becuase i am not getting with same approach 

CezaryBasta
Tera Guru

@sravani thota in the variable attributes, replace what_is_the_assignment_group_you_want_to_modify with user, a field name from the sys_gr_member table, it should help you.

Monika Vancsa
Tera Explorer

Brilliant, thank you!

Version history
Last update:
‎11-12-2022 11:52 PM
Updated by:
Contributors