How to add multiple emails at once in a GlideList User field ?

JérômeM
Tera Contributor

Hello
I would like to have the possiblity to add multiple email addresses (coma-separated) at once in a GlideList field, the Watch List field as example.
Is it something someone got an idea ? I'm trying since a few days without success...

JrmeM_0-1741010922291.png



Enterring emails one by one works, but I would like to be able to do this with multiple.

Thanks
Jérôme

8 REPLIES 8

You can use the below community post to get some idea on how to populate list type variables.

https://www.servicenow.com/community/developer-blog/dynamically-set-list-collector-on-change-of-vari...

Rohit  Singh
Mega Sage

Hi @JérômeM , 

 

Are you trying to add multiple values in watch list at one Go? 

 

If yes then you can do with the help of script.  You can have an array and store sys_id of users and then g_form.setValue("watch_list", array_name); 

 

Here you have to create Client Callable Script Include for pushing sys_id in an array and then rerun the array.

Then in Client script you can write  g_form.setValue("watch_list", array_name)

 

This is high level on how you can set multiple values in your watch list. However the exact solution may differ depending on your scenario. 

 

If my response helped, please mark it helpful and accept the solution so that it benefits future readers.

 

Regards,
Rohit

But I don't need sys_ids to be retrieved. I want to add for example : user1@test.com,user2@test.com,user3@test.com as a one go in the Email part of the glide list.

Ankur Bawiskar
Tera Patron
Tera Patron

@JérômeM 

not possible.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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