Skip to main content

Notifications

Community site session details
Power Automate - Power Automate Desktop
Answered

Use AND / OR with condition

Like (2) ShareShare
ReportReport
Posted on 29 Jul 2024 14:33:26 by 10
Hello dear Power Automate Community,
 
I'm happy to join !
 
I'm migrating my automated processes from Automation Anywhere to MS PAD.
 
Could someone help me finding the equivalent of following Automation Anywhere "if" statement in PAD:
 
 
I found "If windows" and "If window contains" actions that could suit with each one of the condition, but how to use them with AND / OR within the same "if" statement  ?
 
Thanks in advance,
Categories:
  • CU06081340-0 Profile Picture
    4 on 06 Aug 2024 at 13:44:28
    Use AND / OR with condition
    I tried with that expression:
    but having a syntax error.
     
    What would be the right expression ?
     
  • Verified answer
    cwischnewski Profile Picture
    118 on 30 Jul 2024 at 16:18:09
    Use AND / OR with condition
    Tom is right for the generic If under the Conditionals section.  More into can be found at this link, if you are interested to learn more about what you can do: https://learn.microsoft.com/en-us/power-automate/desktop-flows/variable-manipulation
     
    But for your question, I don't think that helps.  On the more specific versions of the If you mention like the "If window contains" and "If web page contains", they are what they are.  I would say to just nest them or use them to set boolean variables that you then use in the traditional If where you can build the more complex conditional.
  • NsL Coder Profile Picture
    469 Super User 2025 Season 1 on 30 Jul 2024 at 14:30:04
    Use AND / OR with condition
    Apology, I didn't realize you are using power automate desktop. I do not use that, so can't help. My replies was relating to power automate cloud flow. not desktop flow, though i cannot imagine it to be too different.
  • OW-29071318-0 Profile Picture
    10 on 30 Jul 2024 at 07:11:04
    Use AND / OR with condition
     
    Thx for your answer.
     
    How would your suggestion "Condition action" look like with my case. I do not find any AND / OR option for condition action in PAD
  • Suggested answer
    NsL Coder Profile Picture
    469 Super User 2025 Season 1 on 29 Jul 2024 at 15:20:01
    Use AND / OR with condition
    power automate support for and/or condition is pretty good.
     
    You can either use expression or the Condition action which allows you to do "group" of condition
     
    Expression:
    and(condition1, or(condition2, condition3))
     
    Condition action:
    AND (
            condition1
            OR (
                    condition2
                    condition3
           )
    )
  • OW-29071318-0 Profile Picture
    10 on 29 Jul 2024 at 15:17:01
    Use AND / OR with condition
    Hi trice602,
     
    Thanks for your answer.
     
    How to use your answer with "If window" and "If window contains" ? To have the same condition as the one in my example ?
  • trice602 Profile Picture
    13,768 Super User 2025 Season 1 on 29 Jul 2024 at 14:48:06
    Use AND / OR with condition
    Hi,
     
    Here's an example that uses Contains, AND, and OR.  I made this up with some variables in a flow, so not a real condition but the formatting will help you with your question.
     
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 18 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 6

#2
John_Mavridis Profile Picture

John_Mavridis 6 Microsoft Employee

Overall leaderboard
Loading started
Loading started