I need to send notifications to each of these email addresses. Can anyone show me how to do this in the workflow?
Answer
Iterate through different email addresses in a repeating field
Best answer by glenda
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
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
