Add multiple email addresses to List Collector on Service Portal/Catalog

Mairvette Tuck1
Mega Contributor

Hello.

Within a catalog item, we have two fields. One is for the user's name the other for their email address.

I've used the table 'sys_user' for both fields. When the user's name is populated, I have it automatically adding their email address to the specific email field, both with 'List Collector' as their variable type.

Issue I am having, is if multiple users are added to the User field, no email address (even previously displayed for the first user) will be displayed. How do I get each additional email address to be displayed in the List Collector / email field?

find_real_file.pngfind_real_file.png

30 REPLIES 30

did you try my code?. I have tested it and even replaced it with your variables name as you showed in your first script.

 

Thanks,

Mohit Kausik

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)

@Mohit Kaushik It wouldn't populate the email address once name was populated.

find_real_file.pngfind_real_file.pngfind_real_file.png

I have again tried the code and it is reflecting for me. If possible then please check the variables name properly and try to put alerts in your code and see if the values are coming correctly:

alert('ids are '+ids);

 

find_real_file.png

 

If possible then set the attribute value as glide_list for your variables. You can do it in below place.

find_real_file.png

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)

@Mairvette Tucker , 

Did my answer help you? or your query got resolved. Then please mark this answer as correct and helpful so that it can go out of unanswered thread and people get help from it.

 

Thanks,

Mohit Kaushik

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)

The solution by @Harshvardhan below was a much simpler solution that worked.