logo

NJP

Reference Qualifier Behaviour For List Collector on Portal and UI 16

Import · Nov 13, 2022 · article

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. :slightly_smiling_face:

Thanks & Regards,

Gunjan Kiratkar

ServiceNow Developer

ServiceNow Community Rising Star 2022

View original source

https://www.servicenow.com/community/developer-articles/reference-qualifier-behaviour-for-list-collector-on-portal-and/ta-p/2380907