cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Collection variable  - and filtering info from another list

Jump to solution


I have a SharePoint list that looks like the following (as an example):

 

In my form the person selects the department who's supervisors need to be notified (so for Dept A all 3 supervisors need to be sent an email).

 

I have read multiple articles on this and realize that I probably need a collection variable, a for each, etc, and even though this seems like it would be really easy... I just can't figure it out.

 

I could really use some detailed instructions on how to do this and don't be afraid to dumb it down!  : )

Labels: (2)
0 Kudos
Reply
11 Replies
Highlighted
Nintex Newbie

Re: Collection variable - and filtering info from another list

Jump to solution

There was a tutorial posted yesterday on how to use collection variables. How to use collection variables

0 Kudos
Reply
Highlighted
Not applicable

Re: Collection variable  - and filtering info from another list

Jump to solution

Yep, I've read that several times and still can't figure out how to do what I need. Sorry.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Collection variable - and filtering info from another list

Jump to solution

So, after I actually read through the tutorial, I realized it doesn't exactly answer your scenario.  You can use the query list to query your list and filter for when department equals whatever the user selects in your form, and then return the Supervisor Email.  Store that in a collection variable.  Then use the For Each to run through each of those and send them a notification.

0 Kudos
Reply
Highlighted
Not applicable

Re: Collection variable  - and filtering info from another list

Jump to solution

Ok, very helpful! Just a little more handholding needed. I'm good until the last sentence. On the For Each action, do I need an Index here and do I need to put in a collection operation inside of the For Each loop? If I do need the Collection Operation... I need help on this part, config settings.

workflow.jpg

collectionoperations.jpg

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Collection variable - and filtering info from another list

Jump to solution

When you configure the "For Each", you'll pick your target collection.  So you'll pick the collection variable you created and used in the query list.  Then for the 'Store Results In' option, you'll need to create a new variable.  You can use the single line of text.  This is where the For Each will store the individual supervisor email when it's going through the collection.  You won't need an index.  Then within the For Each you can configure a Send Notification.  In the 'To' field of the notification you would put the single line of text variable that's holding the supervisor email.

 

So the For Each goes through the collection and pulls out the first email address in the collection and stores that in the single line of text variable.  Then it perfoms whatever actions within the For Each.  Once it completes those actions, it goes back into the collection and gets the second item.  It does this until it it goes through every item in the collection.

View solution in original post

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Collection variable - and filtering info from another list

Jump to solution

Oh, I didn't see the screen shot initially.  You won't need the collection operation in the For Each.  Just put your send Notification. You can perform the actions on the collection in the configuration of the For Each action.

0 Kudos
Reply
Highlighted
Not applicable

Re: Collection variable - and filtering info from another list

Jump to solution

Thank you so much Brendan! This was the info that I was missing and it all makes sense now!!

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Collection variable - and filtering info from another list

Jump to solution

I just ran a quick test, and actually you don't even need the For Each.  You can drop the collection variable directly into the 'To' section on the Notification and it will work.  So that saves you a step.

0 Kudos
Reply
Highlighted
Not applicable

Re: Collection variable  - and filtering info from another list

Jump to solution

Just tested it and it works fabulously. I knew that with the right guidance this had to be an easy solution. Thanks again Brendan.

0 Kudos
Reply