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 / Condition if variable ...
Power Automate
Answered

Condition if variable string contains specific value

(1) ShareShare
ReportReport
Posted on by 41 Season of Giving Solutions 2025
Hi there,
 
I'm setting up a condition to check if a string variable contains two particular string values 'Potential' or 'Precedent'
 
My condition doesn't seem to work and will always return false even if the variable is set to potential or precednet.
 
Any ideas where I am going wrong?
 
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    14,126 Super User 2026 Season 1 on at
    You would not use an expression on the right side of the condition. Just enter the word Potential instead. Then, click add to add another row to the condition and be sure to choose or. Then set it up where your Tags contains Precedent. 
  • Suggested answer
    chiaraalina Profile Picture
    1,864 Super User 2026 Season 1 on at
     
    Can you try with toLower?
     
    @or(
      contains(toLower(string(items('Apply_to_each_2')?['Tags'])), 'potential'),
      contains(toLower(string(items('Apply_to_each_2')?['Tags'])), 'precedent')
    )
     
     
    Also try to add a Compose inside the loop:

    @{items('Apply_to_each_2')?['Tags']}
     
    What does it show? ["Potential","Precedent"] or is it an object?
  • Verified answer
    Kalathiya Profile Picture
    1,696 Super User 2026 Season 1 on at
     
    Please try this:
     
    Expression:
    toLower(variables('Tags'))
    ---------------------------------------------------------------------------------
     
    📩 Need more help? Mention@Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping!
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 612

#2
Valantis Profile Picture

Valantis 344

#3
11manish Profile Picture

11manish 326

Last 30 days Overall leaderboard