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

SanjivMeher
Kilo Patron
Kilo Patron

You can't do it that way. You need to use record producer script and push the email address to the watchlist field using



current.watch_list.push(producer.your_email_variable);



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

Hi Sanjiv,



They may not be all emails ids in our user list.



Thanks,



Laurie


Ok. You can get all the email in a text field delimited by comma if that is fine.



Then in record producer script, split them and push to watch list.



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

Hi Sanjiv,



I tried the code, but it did not push the additional emails.   I tried using user name instead of email address, and that did not work either.



My text field is called add_email.   I tried putting 1 email address, and also more than one with comma separation.



Capture.PNG




Here is the code:



current.assignment_group = producer.u_group;


current.u_caller_dept_name = producer.u_caller_id.u_department_name;


current.u_ncpi_information = producer.u_ncpi_information;


current.description = producer.description;


current.watch_list.push(producer.add_email);


producer.redirect="home.do";



Am I missing something in the code?   Nothing happens.   The Watch List on the form only contains the name of the person in the list collector.



Thank you,



Laurie


Try this.



  1. current.assignment_group = producer.u_group;  
  2. current.u_caller_dept_name = producer.u_caller_id.u_department_name;  
  3. current.u_ncpi_information = producer.u_ncpi_information;  
  4. current.description = producer.description;  
  5. current.watch_list = producer.add_email;  
  6. producer.redirect="home.do";  

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