I am working on the same issue this morning to send emails to users who have more than one issue, but package all issues in a single email to each user.
I am doing the following:
Create a view showing me the individual users with issues, but just their names, and unique values, so users with issues are in the view (query) once, no matter how many issues they have.
Then create a view showing me the users, and their issues.
I loop through the first view
Then, using one name at a time, I loop through the second view
Then taking each issue for this one user, I package it into the email
Then I email this user
End If
End If
Loop
You have to nest them like this, and have your emails send from the center of the nested loops.
HTH
mmcdonal
|