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 write an if act...
Power Automate
Answered

How to write an if action with a logical operator and contain

(1) ShareShare
ReportReport
Posted on by 431

I would like to write an if statement with a logical OR. It seems easy of you are testing for equality bút I’m not sure how to handle “contains”.

 If %myvar% contains ‘original´ OR %myvar” contains ‘exhibít’

then TRUE,

I wasn’t sure of how to fill out the If action dialog bóx

TIA

I have the same question (0)
  • Verified answer
    trice602 Profile Picture
    16,539 Super User 2026 Season 2 on at

    Hi @Steve48 ,

     

    Please use the following.  If this was helpful, please mark as a solution to help others find this solution to similar questions too!

     

    %Contains(MyVar, 'original', False) OR Contains(MyVar, 'exhibit', False)%

     

    trice602_0-1693963927278.png

     

    The False option in the First operand sets case sensitivity, in my example it is case sensitive.

     

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I would just like to add that it's best to use %True% as the second operand, as 'true' is a string and can be interpreted literally, instead of as an actual boolean.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • Steve48 Profile Picture
    431 on at

    Very Nice. Thank you

  • Steve48 Profile Picture
    431 on at

    Thank you Agnius. I will use this suggestion

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 259 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 177 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 136 Super User 2026 Season 2

Last 30 days Overall leaderboard