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 / using wildcard in IF a...
Power Automate
Answered

using wildcard in IF action

(0) ShareShare
ReportReport
Posted on by 391

Hi everyone,

 

I am trying to figure out how can we use wildcard in IF control? I tried this but the result is always false

%items = '<img class*' OR items = '<img width*'%

nicklim_0-1698022736048.png

 

The flow

nicklim_1-1698022787737.png

 

  • Srini007 Profile Picture
    3,490 Super User 2026 Season 1 on at

    Hi @nicklim 

     

    You can choose instead of equal(=), choose Contains which it will check if the value is present in the string

    You can remove * wild character and place only <img class

     

    If you find this reply helpful, please consider giving it a LIKE AND

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION

     

    Regards,

    Srini

  • nicklim Profile Picture
    391 on at

    Hi @Srini007 

     

    Thanks for your feedback. 

     

    My current flow uses Contains operator and multiple elseif statements which I am trying to avoid but it is not a big deal.

     

    Just wondering if we can use wildcard if I want to go with the abovementioned method which is 

    %items = '<img class*' OR items = '<img width*'%

     

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    No, you cannot use wildcards in IF. It does not support it in any way. The only way to do what you want to do is to either use Contains or StartsWith like this:

    %StartsWith(items,'<img class',False) OR Contains(items,'<img width',False)%

     

    I've included both StartsWith and Contains in there for the sake of demonstrating both of them, but you can also make them both use the same operand. The 'False' is there to indicate that it should not ignore case (i.e. the condition is case sensitive).

    -------------------------------------------------------------------------
    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.

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
11manish Profile Picture

11manish 231 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 217 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 170

Last 30 days Overall leaderboard