cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SylvieLet17
Level 8

Contains Condition always false

Hi all, 

I have checked all the similar questions here but nothing worked for me. It's not a case sensitivity issue. 

I have a flow like this:

When a (sharepoint list) item is created or modified

Get item

Initialize groupsVar (Array of choice field with multiple selections enabled)

Condition: If groupsVar contains "Mission", send an email. 

 

One of the possible choices is Mission Groups. I have tried 'Contains "Mission Groups" ' but it still does not work. 
I even added a compose with "Contains "Mission groups" ' which is also returning false. compose.pngCompose2.png

1 ACCEPTED SOLUTION

Accepted Solutions
SylvieLet17
Level 8

Re: Contains Condition always false

Solved it, I guess it's because the output is considered an object, not a string. It doesn't throw an error, but it isn't able to register the word in the string because it's an object. That's my guess anyway. 

The fix was to use a compose action, with formula: 

string(variables('groupsVar'))
to convert the object into a string, and then I used the compose outputs in my condition. 

View solution in original post

1 REPLY 1
SylvieLet17
Level 8

Re: Contains Condition always false

Solved it, I guess it's because the output is considered an object, not a string. It doesn't throw an error, but it isn't able to register the word in the string because it's an object. That's my guess anyway. 

The fix was to use a compose action, with formula: 

string(variables('groupsVar'))
to convert the object into a string, and then I used the compose outputs in my condition. 

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,535)