You are viewing limited content. For full access, please sign in.

Question

Question

Email is being sent to only one staff- Email activity not working as expected.

asked on October 20, 2015

Hi all,

I have a Staff list drop-down which is a multi-valued list and consist of Staff names based on a department. I have also created dynamic fields based on the Department and the Staff List field. Therefore, the Staff List drop-down is dependent based on a specific department. Now, I want that for any staff selected from the drop-down list and an email is sent to the respective staff

In my workflow design, I have used a QueryData activity which retrieves staff names of a specific department coupled with the For Each Row activity. Within the For Each Row actvity, I have added the Email activity and the To recipient is the ForEachRow_Email.

But, while choosing more than one staff from the multi-valued staff list drop-down list, email is being sent to only the first selected staff. I have used track tokens activity to troubleshoot but it is showing the first email address. Can you please tell me where I am wrong?

 

Thanks

Kind Regards,

Sheila

 

 

0 0

Replies

replied on October 21, 2015

Hi Sheila,

Its more efficient to collect the email addresses into a multi-value token and then use one email activity with all of the email addresses listed in the "to:" line. Below are some screen shots of an example:

 

After "Query Data", use "Assign Token Values" to create an empty multi-value token (mine is called Email List).

 

Then, use the "For Each Row" activity to point at the results of the "Query Data." Inside the "for each row", place another "Assign Token Values" and click "Modify" in the properties pane.

You'll be adding each query result to the "Email List" token, so the activity will be "Assign Token Values" and the token will be "Email List." For new values, point to the "for each row" token that is grabbing each email address.

 

Now your "Email List" token will be a multi-value list of each email address. You can take this token and put it in the "to:" field of an email activity. 

Finally, right click on the %(Email List) token and open the token editor. Check "Apply Index", and then "All values separated by: Semi-colon."

This will flatten the multi-value token into a single-value token with each email separated by a semi-colon.

Let me know if this solution works for you!

 

1 0
replied on April 3, 2019

For me in Workflow 10.x I had to also click the "Apply Function" box, choose the "Split function" using the semicolon along with the "Apply Index" and "All values separated by: Semi-colon" to get this to work.

0 0
replied on April 3, 2019

What does your token look like? Split shouldn't be necessary on a multi-value token.

0 0
replied on April 3, 2019

Miruna,

 

 It is a multi-value token with email addresses in it. I am not sure why it wouldn't work with the way that you described it would but I did notice that when the token value was viewed during the debugging stage you could clearly see that they were all seperated by a semi-colon before going through the Apply Index stage.

0 0
replied on October 20, 2015

See this post on how multi-value tokens act in single-value fields.

0 0
replied on October 20, 2015 Show version history

Thanks a lot for the post. But, when retrieving the text values, I have formatted it by semi-colon. For the email activity, is there any way to format it such that every staff list selected receives an email notification?

 

 

0 0
replied on October 20, 2015

It sounds like you're emailing in For Each Row? You want to collect the email addresses there in a separate token, then email after you have all the values.

If I'm reading it wrong, please post screenshots of your activities.

0 0
replied on October 20, 2015

Hi Sheila,

After your "query data" activity, you can create a multi-value token (Name List), and then use the "for each row" tool to append each query result to the "Name List" token. In your email activity, add %(Name List#[; ]#) to the recipients line, which will take each of the token's values, put them into a single field, and separate them with a ";" and an empty space. 

0 0
replied on October 20, 2015 Show version history

Hi,

Infact, in the Staff List_Department, I am removing any duplicates in case the staff name is picked up twice. The email is found in the SQL table.

0 0
replied on October 21, 2015

Please find all screenshots whereby the email has been configured. Thanks to advise me where I did go wrong.

0 0
replied on October 21, 2015

I tried your solution. The email is being sent to only one person even though I have selected more than one person in my multi-valued drop down list.

 

Thanks to let me know where I did go wrong.

0 0
replied on October 22, 2015

Use the token tracking in workflow to see what the value of the multivalue email list token is.  my guess is that your lookup is only returning 1 row (email address).

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.