cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SylvieLet17 Helper V
Helper V

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 Helper V
Helper V

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 Helper V
Helper V

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

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,877)