web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow Ignorning Conditi...
Power Automate
Suggested Answer

Flow Ignorning Condition AND Not Updating per Correct Record

(0) ShareShare
ReportReport
Posted on by 264
Hello, I have a flow I've been working on for a few days now and have slowly gotten it to work for the most part.  However, it's not producing the desired results.
 
I have two lists (PTO Requests and PTO Tracker).  The concept is that requests are put in via a form and placed in the PTO Request List, and when the PTO has actually been confirmed as completed, the Supervisor marks it as Completed, and the PTO Tracker list adds the hours used for the specific request to their Employee Records PTO used Column.  Below is the PTO Request List.  This flow I'm working on should trigger when a record is modified.
 
 
Well, I'm at the point where when the Request Status is marked as Completed, the flow is triggering, but it appears to be ignorning the Condtion that the Request Status equal Completed, and it's taking the PTO Requested Hours from the first record in the PTO Requested lists and updating all Employee Record PTO Used Column in the PTO Tracker list to the first record's PTO Requested Hours.
 
 
In the screencap above, the Request Status was marked as Completed.  The flow will trigger as it should, but this is where it doesn't do what I need it to.  Below is the entire flow.
 
 
Below is the screencap from the results of the Flow in the PTO Tracker list.  It's adding 40 hours to each employee's PTO Used Column.  Based on what was updated on the PTO Request list, it should first, ignore the first request because it's marked as Requested and NOT Completed.  Secondly, once it gets past that, it should be adding the PTO Requested Hours of 8 to the affected Employee's Record in the PTO Tracker List.  In other words record 1 should still be 0 (zero) and record 2 shoud be 8.
 
 
Can someone please tell me where my logic is broken in this flow and set me straight?  I know I'm not doing something right.  Also, a couple other notes... the expressions on the Set PTO Used and Update PTO Used On PTO Tracker PTO Used Column were finally completed after discovering the flow was not cooperating with quick expressions available from previous steps. 
Categories:
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    I might be missing something, but I think your flow is setup to update all PTO Trackers on all PTO Requests whenever one is Completed.  I think it might even be going through all of your PTO Trackers for all PTO Requests twice.

    Is there a reason why are you listing PTO Requests after the PTO Request modified trigger?

    It also looks like you have nested loops that are looping through the same list of items.  If so, you definitely don't want to be doing this.


    It looks to me like you have it set up to where when one PTO Request is modified you loop through every single PTO Request then loop through every PTO Tracker for each of them, then update them all if the trigger PTO Request is complete, and then you do it again.

    If I'm following your desired goal I think you only need one loop (the "For each Employee loop").  So you need to remove the "Get Request" list action, move your condition out of the first "For each record check request" loop and delete that loop, then remove the second "For Each" loop in the true branch, and fix any references to these unnecessary loops.

    Let me know if that helps
  • forbudt4u Profile Picture
    264 on at
    Grandma always said two heads are better than one, Mark Nanneman.  Your prognosis was spot on and makes total sense once the light went off. The reason I had it set up the way it was because during my original attempt to set this up I kept having issues with the flow reading the hours as a float value, and it was not seeing the Request Status' correctly.  The 2nd For Each in the last loop was my attempt in repairing those errors, and in my attempts to try to correct that, I didn't put two and two together about removing the initial Get Requests and the 2nd For Each. 
     
    Brain fog kills... thanks for pulling me out of the darkness.    
  • Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    I get it, believe me. 

    [Edit/Update:  Originally I mentioned  here something about redundant loops getting created in the new flow designer and someone immediately reached out to me about the issue.  While explaining how it happens and demonstrating it they fixed it.  Either that or it was a temporary thing for me.  In either case, thanks Microsoft!]

    Good luck, and if you get your flow working please mark my response as an answer, thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 323 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 183 Most Valuable Professional

Last 30 days Overall leaderboard