web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / "Contains" conditional...
Power Automate
Answered

"Contains" conditional check no longer working

(0) ShareShare
ReportReport
Posted on by 11

I've got several flows setup that use conditional checks, which are suddenly no longer working as of about a week ago. I've spent hours trying to figure out why, and I'm no closer to a solution than when I started. Basically I have two separate Sharepoint lists, one with tickets submitted through a Power App, and another that lists out admin users and what ticket queues they're responsible for.

 

I have several flows to support these operations:

  • Sending an email to the admins of a queue when a new ticket is submitted to their queue
  • Automated reminder of new tickets that haven't been updated in a week
  • Automated reminder of in-progress tickets that haven't been updated in a week

Each of these has a similar function - they grab the full list of admin users, looping through each user and checking to see if the ticket's Queue is in the list of Queues each user is responsible for. If there's a match, they're added to the email.

Except suddenly the comparison check that sees if Queues contains Queue isn't working, even though I haven't touched the flows in months. Every user comes back false, regardless of whether or not they have the Queue in their Queues field. I've tried fiddling with the conditional check, using Queue Value instead, forcibly converting Queues and Queue to strings, etc., and nothing's worked. So now I turn to the wider community.

I'd definitely love to know why my flows worked fine for months only to suddenly stop. Makes me think MS changed something under the hood. But more importantly, I'd appreciate assistance on getting these flows working again.

Also, before anyone says "Why not use an ODATA filter instead of a loop?" I've also spent hours trying every possible permutation I can find on the internet, and all I ever get for my trouble is "The filter is not valid". But if there's a way to get that working instead, I'm all ears. Thanks.

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @ZeroPoint 

     

    Did you checked the run history and the relevant values? Also a sample screenshot of your flow and run history of the values will be helpful. Its difficult to give you an exact answer without looking more into this.

     

    Thanks

  • ZeroPoint Profile Picture
    11 on at

    I did. The Queues list seems to be an array of objects, and the Queue is an object. At least on the rare instances I can get the run history to actually tell me anything. Here's a screenshot of the relevant section of the flow. I'm really not sure why it can't find a match.

     

    flow issue 1.png

  • OliverR-82 Profile Picture
    619 on at

    What types of fields are the "Queues" and "Queue" fields? Are they dropdowns (I forgot what the correct name in SharePoint is)? If so, I would think that you would need to compare Queues Value to Queue Value.

     

    As for filtering your selection, I can confirm that getting the contains() function to work with an Odata filter in Power Automate does not seem possible; at least I've not been able to get it to work after trying every possible way of using it, much like you said. However, a workaround that I've found seems to work, is just using a "Filter array" action.

    OliverR82_1-1636128477749.png

    After the filter action you would then probably need an Apply to each to build your mail addresses string, much like you do now. You would feed the output from the filter action into the apply to each action for that.

     

    But even using that you would still need to use the proper dynamic contents in your condition in the filter action, ie. Queue(s) value if those are dropdown fields or even lookup fields.

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @ZeroPoint 

     

    Could you add two compose action steps before the IF statement. Map queues and queue. Run the flow. Check the run history and compare the values from compose steps.

     

    Thanks

  • Verified answer
    ZeroPoint Profile Picture
    11 on at

    @OliverR-82 wrote:

    What types of fields are the "Queues" and "Queue" fields? Are they dropdowns (I forgot what the correct name in SharePoint is)? If so, I would think that you would need to compare Queues Value to Queue Value.

     

    As for filtering your selection, I can confirm that getting the contains() function to work with an Odata filter in Power Automate does not seem possible; at least I've not been able to get it to work after trying every possible way of using it, much like you said. However, a workaround that I've found seems to work, is just using a "Filter array" action.

    OliverR82_1-1636128477749.png

    After the filter action you would then probably need an Apply to each to build your mail addresses string, much like you do now. You would feed the output from the filter action into the apply to each action for that.

     

    But even using that you would still need to use the proper dynamic contents in your condition in the filter action, ie. Queue(s) value if those are dropdown fields or even lookup fields.


    Correct, they're Choice fields (with the one for users allowing multiple selections). I tried to use Queue Values instead, but it kept forcing me to run another for each loop over it, and then just complained Queue Values wasn't valid. Typical MS design.

     

    But cool, I didn't even know filter array was a thing. That might help the flows run a little faster (not that they're super slow right now anyway, but that might change over time). I'll try that out!

     

     

    Could you add two compose action steps before the IF statement. Map queues and queue. Run the flow. Check the run history and compare the values from compose steps.

     

    Thanks



    So I did that, and apparently there's an ID value mismatch between the entries in Queues and the value of Queue (The tickets and users lists have their own fields). I have no idea how that happened or why it's suddenly a problem, but I dug into the list settings for both and got them lined back up, and emails are finally working again. This would have been sooooo much easier if the ability to look at variables during a flow run was built in, instead of requiring custom parts to output them.

  • v-xiaochen-msft Profile Picture
    on at

    Hi @ZeroPoint ,

     

    Glad to see you solved your problem.

    You could mark the correct reply as a solution.

     

    Best Regards,

    Wearsky

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard