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 417

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
    417 on at

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

  • Verified answer
    Highboy Profile Picture
    1,187 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
    417 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
    417 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 271 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 171 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 148 Super User 2026 Season 2

Last 30 days Overall leaderboard