cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Iterate through different email addresses in a repeating field

Jump to solution

I need to send notifications to each of these email addresses. Can anyone show me how to do this in the workflow?

Reply
3 Replies
Workflow Hero

Re: Iterate through different email addresses in a repeating field

Jump to solution

Hi,

Is each email addresses in a row of a repeating section control? If so, were you able to get them into a collection variable from repeating section? 

Also share screen shot of your repeating section.

Thanks,

Krishna.

Reply
Workflow Hero

Re: Iterate through different email addresses in a repeating field

Jump to solution

Hi Lars, 

Have you used a text field for input of the email addresses or is it a people field? 

The first will be easier to solve then the latter as you will need less steps to retrieve the correct email address without the "#i:0#.f|membership|". 

In case it is a text field:

  • Make sure you name your repeating section in your form: e.g. "RepeatingSectionEmails". Also give the email address field a name, let's say "EmailAddress".
  • It is possible to query the repeating section from your workflow, but it is even easier if you first connect it to a multiple lines of text field. So create a column, you could call it "repeating section output". Connect your repeating section to it from the control settings on your form. 
  • Open up your workflow, add the Query XML action
    • Input: the "repeating section output" column that you connected to the repeating section. 
    • XPath query: "//Items/EmailAddress" (only what is between the quotes)
    • Output: a collection variable that you create e.g. var_coll_EmailAddressesFromRepeatingSection.
  • Add a For Each action
    • Input: var_coll_EmailAddressesFromRepeatingSection.
    • Output value: this is the e-mail address that will be in your for each run. You can store it in a variable so you can easily use it. Create a variable var_text_currentEmailAddress.
    • The other settings I don't think you need. 
  • In your for each, you could include a send a notification action if you want to send individual notifications, just use the "var_text_currentEmailAddress" in the To field. If you want to send only one email to all email addresses at the same time, you need to configure and manipulate some more variables. 

Hope this helps!

Glenda

Reply
Workflow Hero

Re: Iterate through different email addresses in a repeating field

Jump to solution

Thanks Glenda. This is how I did it. The collection operation at the end isn't necessary but I wanted to see the list of email addresses collected in the history list

0 Kudos
Reply