Record Producer - How to Map Email Variable with Watch List

Laurie Marlowe1
Kilo Sage

Hello,

I have a requirement on a record producer to have a Watch List and also add Email Address (to Watch List).   I used a List Collector variable mapped to Watch List.   I added an Email variable, but I cannot figure out how to add it to the List Collector list in order to have it go to the Watch List on the form.   I tried using the variable type Macro with Label, and macro_watch_list, but that did not solve the problem of how to get the email address into the Watch List.  

Is this doable?

Capture.JPG

Thank you,

Laurie

1 ACCEPTED SOLUTION

Ok Great. So this should work then



  1. current.watch_list = producer.add_email+','+producer.your_list_collector_var.toString();


or current.watch_list = current.watch_list+','+producer.add_email;



Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

13 REPLIES 13

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

Laurie, is it just one email you need to add or multiple?   Variable list collectors don't behave like watch lists where you can add emails in the list.   But using the record producer script you could concatenate your additional email to the watch list as it is being inserted.


Hi Michael,



I'm going to say multiple, just in case!   If I know our users, they will want the option.   Is that do-able?



Thanks,



Laurie


OK unfortunately there is no way to collect a free form list out of the box, however there is a table variable that is on ServiceNow Share:


ServiceNow Share



You could use this to collect the list and then concatenate it via code in the record producer script.


All the email ids you want, are they not part of your user list?



Please mark this response as correct or helpful if it assisted you with your question.