Skip to main content

Notifications

Community site session details

Community site session details

Session Id : LVdloS05gBogF0/mFjUS9x
Power Automate - General Discussion
Unanswered

‘Contains’ not working with OData filter query as expected with List all items present in table Fin and Ops action

Like (0) ShareShare
ReportReport
Posted on 8 Feb 2024 10:00:10 by 6

Hi all,

 

I’m trying to perform the following filter query on the ‘List all items present in table’ Fin and Ops action:

 

contains(Comments, '@{variables('toFind')}')

 

However, nothing is being returned, even if the toFind variable contains a real substring of the field.

 

Even more strangely is that if I use a filter array after finding all records with the following parameters:

 

item()?['Comments'] contains  "variables('toFind')"}]}

 

I get the exact result I expect, however I need to be filtering with the List all action, so this is not suitable.

 

Does anyone know how I might fix this or other approaches I can try? Thank you!

  • Alex1171 Profile Picture
    6 on 08 Feb 2024 at 12:52:02
    Re: ‘Contains’ not working with OData filter query as expected with List all items present in table Fin and Ops action

    Hey @Expiscornovus yep I tried with that syntax and still get an error. I'm guessing it must be data specific since I'm not having issues with the other fields, at a bit of a loss. Thanks for your help again.

  • Expiscornovus Profile Picture
    31,652 Most Valuable Professional on 08 Feb 2024 at 11:37:16
    Re: ‘Contains’ not working with OData filter query as expected with List all items present in table Fin and Ops action

    Hi @Alex1171,

     

    Yes, than it sounds like to be more of a field type of thing. I need to refresh my memory on comments/notes fields of F&O, it's been a while since I configured that application. Let me double check that part.

     

    In the meantime be aware that the substringof function is an odd one from a syntax point of view. While most functions would list the field as the  first parameter.

     

     

    contains(MyField, 'test')

     

     

    The substringof function lists the value as the first parameter

     

    substringof('test', MyField)

     

     

  • Alex1171 Profile Picture
    6 on 08 Feb 2024 at 11:30:38
    Re: ‘Contains’ not working with OData filter query as expected with List all items present in table Fin and Ops action

    Thanks for the reply! @Expiscornovus so even more strange it works fine on other fields in the table with the exact same syntax so it specifically seems like somethings up with the comments field. I tried substringof but that doesn't seem like a support function for F&O ODate queries.

  • Expiscornovus Profile Picture
    31,652 Most Valuable Professional on 08 Feb 2024 at 11:11:34
    Re: ‘Contains’ not working with OData filter query as expected with List all items present in table Fin and Ops action

    Hi @Alex1171,

     

    Some list actions don't support all the OData functions. For example I know the contains cannot be used in the SharePoint Get Items action OData filter query. In that action you can use the substringof function instead of the contains function. 

     

    Maybe that is the same case with the FinOps List all items present in table action. Have you tried the substringof function instead?

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,079 Most Valuable Professional

Leaderboard
Loading started