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 / How to use IF condition?
Power Automate
Unanswered

How to use IF condition?

(0) ShareShare
ReportReport
Posted on by 331

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

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

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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard