Skip to main content

Notifications

Power Automate - Using Flows
Unanswered

I need some help with multiple conditions and searching for changed items

Posted on 22 Nov 2024 18:25:23 by 2
So basically... i have a list and two columns on that list are IT completed and HR completed - the IT completed has a completed option and the HR has a Yes option when they are done modifying the list. I want it to first check when HR completed the list and changed the column to Yes then for it to send an email, then when IT completed the column Completed send an email but i got it to send email under one but when i trigger the completed for IT it sends the email for both HR and IT... but i need one first then other when their boxes are completed
  • creativeopinion Profile Picture
    creativeopinion 9,831 on 23 Nov 2024 at 00:49:45
    I need some help with multiple conditions and searching for changed items
    The reason it's sending for both is because of the logic of your flow. 
    1. Your flow is triggering when an item is updated.
    2. Parallel Condition Checks
      1.  Is IT Completed
        1. If Yes: Send an Email
      2. Is HR Completed
        1. If Yes: Send an Email
    If your flow runs and only one of the two columns are checked it will send an email to the appropriate column. For instance if your flow is triggered where the HR Completed is checked, it will send the email to HR. When the flow is triggered again, it will run a check and the second time it triggers it will send two emails, because of how you've set up your flow.
     
    In addition to this, if you do not have any trigger conditions set up in your flow.. your flow will run every time the item is updated. So if you make a change to another column (lets say to the title column for example) it'll trigger the flow again and the emails will be sent out again.
     
    I would recommend that you add two additional columns for a timestamp to indicate that the email has been sent. This way you can prevent the email from being sent more than once. However, since your flow is being triggered when an item is updated, and you are ending with an Update Item action you need to take steps to avoid creating an infinite loop.
     
    Refer to this tutorial on how to prevent an infinite loop.
     
     
    In this Power Automate Tutorial I’m going to show you 3 ways to avoid an infinite loop. Keep in mind that there are more ways to avoid the infinite loop than what I’ll cover in this tutorial—choose the solution that works best for you.
    ---
    IN THIS VIDEO:
    âś“ Understanding What Causes Infinite Loops
    âś“ Avoiding Infinite Loops with the Recurrence Trigger
    âś“ Filtering to Return Files Only in Power Automate
    âś“ How to Output a Total Count in Power Automate with the length() function
    âś“ Using Trigger Conditions to Prevent Flow Re-triggering
    âś“ Leveraging Service Accounts to Avoid Infinite Loops
     
    Hope this helps!
  • RB-22111403-0 Profile Picture
    RB-22111403-0 2 on 22 Nov 2024 at 20:16:19
    I need some help with multiple conditions and searching for changed items
    but my flow works.. one of the send emails does exactly what i want, the other when it triggers is just doing both completed and Yes for both... so like i tried to have them separate then i put them together because it made more sense. 
  • creativeopinion Profile Picture
    creativeopinion 9,831 on 22 Nov 2024 at 18:54:20
    I need some help with multiple conditions and searching for changed items
    The logic of your flow needs to be adjusted. Your flow is being triggered when an item is modified in the list. You then have two parallel actions:
    • Send email to HR 
    • Send Email to Helpdesk
    When using automated triggers, it's best practice to use a trigger condition. In your case, the easiest way would be to create two separate flows. One that triggers when the IT Completed column is updated and another that triggers when the HR Completed column is updated. Ensure you add a trigger condition to each of your flows so they only trigger when their respective column is marked as completed.
     
    You might be interested in these YT Tutorial:
     
     
    Trigger conditions can be set in most flow triggers. These conditions you set must be true for the trigger to fire.
    In this Power Automate tutorial, I’m going to show you how to use trigger conditions in your flows to control when your Power Automate flows trigger. If your plan has flow run limits—you can avoid triggering your flows unnecessarily by using trigger conditions.
     
    I’ll cover four different flow examples that would benefit from trigger conditions:
     
    ⚡️ Triggering a flow when a column is changed to a specific value
    ⚡️ Triggering a Flow When an Event Updated or Deleted
    ⚡️ Triggering a Flow When a New Folder is Created
    ⚡️ Triggering a Flow When a Specific Email is Received
     
    I’ll also show you a trick on how to easily create the expressions needed and give you a few tips on how to troubleshoot your flow.
     
    IN THIS VIDEO:
    âś“ Four different flows that would benefit from trigger conditions
    âś“ What is a trigger condition?
    âś“ How to add a trigger condition to your flow
    âś“ How to trigger a flow when a column is changed to a specific value
    âś“ How to trigger a flow when an event is updated or Deleted
    âś“ How to trigger a flow when a new folder is created
    âś“ How to trigger a flow when a specific email is received
    âś“ How to troubleshoot a trigger condition
    âś“ How to prevent case sensitivity issues with a trigger condition
    âś“ How to use the filter array action to easily compose an expression that can be used in a trigger condition
     
    ---
     

    Is your Microsoft Power Automate flow succeeding but you’re just not getting the results you expected?
    In this Power Automate tutorial, I explore 5 frequently asked questions that pop up when troubleshooting a flow. If you’d like to to level up your Power Automate flow skills and learn how to troubleshoot your Power Automate flow—this tutorial is for you!

    IN THIS VIDEO:
    âś“ How to troubleshoot a false Condition action result
    ✓ How to get dynamic content when it isn’t selectable from the list of dynamic content
    ✓ How to troubleshoot an Apply to Each action that isn’t looping through
    âś“ How to troubleshoot a skipped Apply to Each action
    âś“ How to troubleshoot a Filter Query
    âś“ How to use a SharePoint yes/no column in a Filter Query
    âś“ How to use Compose actions to troubleshoot a Power Automate flow
    âś“ How to troubleshoot multiple emails being sent
    âś“ How to troubleshoot multiple Teams messages being sent
     


     
    Hope this helps!
    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,111

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,795

Leaderboard

Featured topics

Restore a deleted flow