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

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
    15,402 Super User 2025 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

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard