The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Populate all the users selected in "requested for" in requested for email id variable in servicenow

tulasi8
Tera Contributor

Hi Community,

 

Here my requirement is , for a catalog item "requested for" should allow multiple selections, if they select 4 users all those 4 users email id should get populate in "requested for email" . I have written script include and on change client script on "requested for" but it's not working. Can anyone please help to achive this requirement . @Ankur Bawiskar 

 

Thanks,

Prasanna

9 REPLIES 9

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @tulasi8 

The method is the same for each use case.
Use the Auto Populate feature in ServiceNow under the Variable Editor.

Create 4 different questions and 4 different ones for email.
Then, link Question 1 to the other questions using Auto Populate — this will automatically populate the related fields with the correct values.

\

DrAtulGLNG_0-1758620487870.png

 

https://www.servicenow.com/community/itsm-articles/using-the-variable-auto-populate-feature-with-var...

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

@Dr Atul G- LNG can you say clearly , it's not about 4 users only . they can select 7 , 8 or 9 as per their wish in "requested for" so that all those users email id should get populate in "Requested for email"

Hi @tulasi8 

Yes, it's a combination like this:

  • Q1: First "Requested For"

  • Q2: First "Requested For Email ID"

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@tulasi8 

so it's a list collector and you have another text variable where you want to auto populate with email.

this link has script

Populate Email Addresses of users selected in List Collector variable to Multi Line Text Variable 

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