Slowly but surely learning Nintex forms and Nitex workflow.
I have a site workflow. The workflow is going to have to be scheduled.
It's first action is to query a list and collect various other fields:
I have a For Each loop
With 2 collection operations:
The end of my workflow has a send notification action.
The send notification sends an email to a named individual, yet how or where do I add another query list (?) or another action to specify that within the email I only want to show items which the named individual is named in the To field and
not all list items which was originally queried.
The named individual isn't necessarily known until the list has been queried, so I can't filter on the first list query.
Solved! Go to Solution.
I'm assuming you're trying to group all the entries from the list you're querying based on a person assigned to them, and then send a single email with all of those related items in the body of the email. To accomplish this, you would need to have a loop within a loop. The 2nd loop would need to do the work of collecting only those entries that belong to the person you're sending the notification to. Assuming one of the fields you're pulling back from the first query is the person the notification goes to, I would sort the results from that query list by the person name. Then in the second loop you can set a condition for it to run as long as the person for the current item equals the person for the previous item. You would collect those records in a variable. Once the names don't equal, that's your trigger to send the notification to the person with the records that belong to them, then start the process again for the new person.
Brendan et al.
I'm almost there. My workflow looks as the pictures below. Looking at my verbose logging. The forEach loop is working and filtering my list by whom an item is assigned to. The "collection" send notification action is showing the correct results. i.e. all my collection variables are working and the email is going to the correct person(s).
Yet, my final email outside of the loop is only going to one person and not everybody in an assigned to collection.
Any thoughts ?
How is that notification configured? If you're using a variable in the Send To field, how is that variable being set up? Without seeing the details it's hard to advise where the problem may be.
This has annoyed me for a long time, but finally cracked it.
Recap: filter SP list (columns:id,title, assigned to etc.) and send an individual user an email with a list of items where they are the person named in the assigned to column.
Finished workflow is as simple as:
The 1st query list action :
The collection operator
The 2nd query list (inside of the for each loop)
Note the 2nd ID Collection variable.
Send to action