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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to use IF condition?
Power Automate
Answered

How to use IF condition?

(0) ShareShare
ReportReport
Posted on by 381

How to use (IF) condition with (AND, OR), PAD seems to be no compilation format example in the description and teaching?
How to program the OR condition in the figure?

pad7.png

I have the same question (0)
  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    That won't work because it is wrong syntax.

    I would just advise an Else statement to finish it up.

  • alee001 Profile Picture
    381 on at

    I know but not example syntax, why can't I use (OR, AND) only (else if)?

  • Verified answer
    Highboy Profile Picture
    1,185 Super User 2024 Season 1 on at
    %Index = 1 OR Index = 2% True if the value of the Index variable is 1 OR 2, otherwise False.
    %Index = 4 AND Text = "Four"% True if the value of the Index variable is 4 AND the value of the Text variable is Four, otherwise False.

    https://learn.microsoft.com/en-us/power-automate/desktop-flows/how-to/logical-operations-conditional-statements

     

  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    @Highboy is probably showing you the correct syntax.

     

     

    Your's won't work because in first instance within programming languages, OR and AND can't be used to combine VALUES in an expression. BUT they can be combined to compare boolean Expressions (an example is what is given like: if X = 5 or Y =, than it is False or True. 

     

    I didn't know you could use False or True within the compare value so that is coo.

     

     

  • alee001 Profile Picture
    381 on at

    In fact, I also tried this syntax but not work. (as shown in the picture)

    pad7a.png

  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    Try Cancel as 'Cancel'

  • alee001 Profile Picture
    381 on at

    Changed 'Cancel' and it works again! The syntax of PAD is different from others, and it is difficult to write without samples. Thanks you.

    pad7b.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard