How to set Email Variable to accept multiple entries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 12:45 AM - edited 03-14-2023 12:46 AM
Hi Devs,
Looking for advice on how to change this field to accept and validate multiple email addresses:
My thoughts are:
- Keep variable type = "Email" but enable user to enter multiple email address (not sure how this can be done)
- Change variable type to "Multi Line Text" but write a script that validates every entry to ensure it is in email address format
- I though of changing it to list collector, but this won't probably suit as the field should be able to accept email addresses regardless of domain
Relatively new to all this (1 month in) and really enjoying learning! Also glad to see all the resources available here and to see such an active and supportive community.
Looking forward to any advice and thanks for your time 🙂
Dee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 12:55 AM
I will go with 2nd option.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 01:09 AM
Thanks Ankur! Any advice on how I can do this? 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 01:13 AM
inform user to enter email address separated by comma.
have onChange client script on that variable and get individual email addresses and validate them.
show alert to user saying which email address is invalid.
you can easily find email validation regex on community or in google.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader