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:
Facility | User (and only people reminder should go to) | Reminder Email actually went to |
A | 1 & 2 | 1 & 2 |
B | 3 | 1, 2 & 3 |
C | 4 & 5 | 1 - 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!
@DAllen365 (you were a big help on my last question -- hoping you can do it again!)
Solved! Go to Solution.
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.
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.
Thanks again!
Is this what you mean?
@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.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
User | Count |
---|---|
78 | |
20 | |
17 | |
14 | |
13 |
User | Count |
---|---|
134 | |
35 | |
30 | |
29 | |
25 |