carriecalvi
Nintex Newbie

Send to Multiple Email Address(es) based on selected check boxes and querying a SharePoint List

Hello All,

I have looked at many posts but just can't seem to get there.  I have a Form that has multiple checkboxes for branches. 

branches.png

The requirements are for the workflow that it will only send to those folks at those branches and not all.  

I created a Sharepoint list to pull the information from

nintexlookuplist.png

In the Workflow (based on other posts) I created two collection variables

variables.png

Then I created a query filtering by Branches

Query.png

If they select "All Branches" it will send to everyone listed no issues.

If they select just Atlanta it works

If they select Atlanta, Dallas it errors and gives this error

workflow error.png

Because I like to try everything I did try to create a group to put in place of the individual emails and same thing happens. It will work for the one but not if several are selected which is what I need.

groups.png

HELP! I feel I am so close!

I am using on Prem Nintex Forms and Workflows 2013

 

0 Kudos
Reply
9 Replies
CollinBurnell
Nintex Newbie

Re: Send to Multiple Email Address(es) based on selected check boxes and querying a SharePoint List

Are you separating the resulting email addresses with a semicolon and a space?
0 Kudos
Reply
carriecalvi
Nintex Newbie

Re: Send to Multiple Email Address(es) based on selected check boxes and querying a SharePoint List

It is using a Person or Group Type Column so it does that automatically.

0 Kudos
Reply
CollinBurnell
Nintex Newbie

Re: Send to Multiple Email Address(es) based on selected check boxes and querying a SharePoint List

Another possibility is that there is an issue with the separator in the Branches field/column itself... possibly within the Query List filter.
-or-
Have you tried Branch Location |contains| Branches?
Reply
carriecalvi
Nintex Newbie

Re: Send to Multiple Email Address(es) based on selected check boxes and querying a SharePoint List

I tried that and it didn't work.  I even put another column in with single text field and put the email addresses with ; and space between and tried the contains and is equal to and it errors.

0 Kudos
Reply
Warwick
Nintex Newbie

Re: Send to Multiple Email Address(es) based on selected check boxes and querying a SharePoint List

If only 1 tick box is selected the result would be "All Branches" and the list query works as it finds "All Branches" in a single record

 

If multiple boxes are ticked the results would be "Atlanta, Miami" and the list query can't find any records that match that exactly (as you have atlanda, and miami in separate lines.

 

So you'll need to first parse the branches selection using a regex, spiting on "," and storing in a collection

Warwick_0-1603345234095.png

 

then you do a for loop on the collection (it will run once for each branch (create a text variable) found in Branches)

Warwick_1-1603345324669.png

 

Then in the loop add the query record updating to use the variable "branches" to query with and send the email

Warwick_2-1603345403729.png

 

Reply
gman
Nintex Newbie

Re: Send to Multiple Email Address(es) based on selected check boxes and querying a SharePoint List

I agree with Warwick, that is the method we use also.
Reply
carriecalvi
Nintex Newbie

Re: Send to Multiple Email Address(es) based on selected check boxes and querying a SharePoint List

Ok I will try to implement and test and let you know.
Reply
carriecalvi
Nintex Newbie

Re: Send to Multiple Email Address(es) based on selected check boxes and querying a SharePoint List

So should I not be using a separate list for Branches and Branch Contacts?  

0 Kudos
Reply
Warwick
Nintex Newbie

Re: Send to Multiple Email Address(es) based on selected check boxes and querying a SharePoint List

Either way works, which ever is ok.
0 Kudos
Reply