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 to check if ...
Power Automate
Unanswered

Condition to check if specific string of characters exist in a String Variable is not working

(0) ShareShare
ReportReport
Posted on by 278

I have a string variable that I build out with a list of email addresses.

 

For example:

 

UserList - abc@domain.com;def@domain.com;ghi@domain.com

 

I am tring to use a condition to see if there is a specific string in that variable.

For example, I want to check if def is already in there.

If not, then add def@domain.com to the variable.

if it is there already, then nothing.

 

I setup a condition like this below, but it constantly adds the address, when it should not.

I am expecting it to find 'def' inside the UserList variable that has the above addresses.

It is not though.

The contains is this:

 

contains(variables('UserList'),'def')

 

Travis5150_0-1719070107062.png

 

 

Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,508 Moderator on at

    @Travis5150 You can troubleshoot your issue two ways, first way would be to add a Compose action above your Condition action. Insert your expression and run a test and review the outputs. Since you are using this expression in your condition action, you'll want to verify the output of the expression is true (which is the value you are comparing to in your Condition action).

    creativeopinion_0-1719075454168.png

     

    The second way is to confirm the output of the variable contains the string you are searching for. Instead of using an expression, use the contains operator.

    creativeopinion_1-1719075560445.png

     

    5 Power Automate Troubleshooting FAQs and Helpful Tips for Creating Better Flows

     

    In this Power Automate tutorial, I explore 5 frequently asked questions that pop up when troubleshooting a flow. If you’d like to to level up your Power Automate flow skills and learn how to troubleshoot your Power Automate flow—this tutorial is for you!

     

    IN THIS VIDEO:

    ✅ How to troubleshoot a false Condition action result

    ✅ How to get dynamic content when it isn’t selectable from the list of dynamic content

    ✅ How to troubleshoot an Apply to Each action that isn’t looping through

    ✅ How to troubleshoot a skipped Apply to Each action

    ✅ How to troubleshoot a Filter Query

    ✅ How to use a SharePoint yes/no column in a Filter Query

    ✅ How to use Compose actions to troubleshoot a Power Automate flow

    ✅ How to troubleshoot multiple emails being sent

    ✅ How to troubleshoot multiple Teams messages being sent

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

     

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
Vish WR Profile Picture

Vish WR 484

#2
Valantis Profile Picture

Valantis 477

#3
Haque Profile Picture

Haque 456

Last 30 days Overall leaderboard