cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AAallday
Helper I
Helper I

Sending email to assigned user in item only

Hello,

 

I have a list that tracks annual on-site visits. Each visit is assigned to a couple of people. The intent of the flow I created was to send a reminder email each month to users who have a past due site visit or one due before the end of the following month (i.e. on the 26th of each month I look for pending site visits that have a due date in the next 37 days).

 

When the flow ran this month, it pulled the right list of facilities, but with each new facility it kept the email of the previous recipient(s), so buy the end it emailed all the reminder to anyone who was in the assigned to column within that set of facilities.

 

for example:

FacilityUser (and only people reminder should go to)Reminder Email actually went to 
A

1 & 2

1 & 2

B31, 2 & 3
C4 & 51 - 5

 

So what i need is that each email recipient is established new for each list item.

 

 

Here is my flow -- I am super-novice and tried to piece together from other questions in the forum -- thanks in advance!

 
 

Snag_22db2001.png

Snag_22db65c5.png

Snag_22dba3c8.png

 

@DAllen365 (you were a big help on my last question -- hoping you can do it again!)

1 ACCEPTED SOLUTION

Accepted Solutions
DAllen365
Resolver III
Resolver III

Hey @AAallday, thanks for the outreach!  After reading over your issue, it appears that your issue is that it is continuing to append to the variable and is never reset during each foreach.  What I think you should try is to add a set variable action at the top (or very bottom) of each foreach loop where you set the variable to the expression null().  This will erase the variable so it only holds the values for that list item and should solve your issue.  Let us know!


----------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
DAllen365
Resolver III
Resolver III

Hey @AAallday, thanks for the outreach!  After reading over your issue, it appears that your issue is that it is continuing to append to the variable and is never reset during each foreach.  What I think you should try is to add a set variable action at the top (or very bottom) of each foreach loop where you set the variable to the expression null().  This will erase the variable so it only holds the values for that list item and should solve your issue.  Let us know!


----------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Thanks again! 

Is this what you mean? 

AAallday_0-1615909984603.png

 

@AAallday Yes, I believe that should work.  I like to put it as the first action inside the foreach, but at the end should work too.  I actually just had to do again today to fix a looping issue.  Glad it was helpful!


----------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,973)