Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Fkl5WxDS3SQsNCoybby1+t
Power Automate - General Discussion
Unanswered

odata contains

Like (0) ShareShare
ReportReport
Posted on 16 Nov 2020 23:33:44 by 658

sasrsc_0-1605569420134.png

I'm doing a getFiles action step with the properties only.... trying to do contains (which is apparently a substringof).
I have tried contains and substringof - neither works. 
I also couldn't find a good reference to this in the Msft documentation that is actively updated.
I am currently using a startswith odata filter successfully and not sure why this is rejected. 


  • danishpowerapps Profile Picture
    66 on 01 Oct 2024 at 08:16:04
    odata contains
    Hi @sasrsc

    I ran into the same issue - it seems you were onto the fact that "contains" is not supported by Sharepoint list.

    Seems it's bloody hard to get something working on a text field where you filter on contains/not contains...

    Check the documentation for query options here (scroll down to a diagram showing the overview):

    Cheers
  • Jcook Profile Picture
    7,770 Most Valuable Professional on 20 Nov 2020 at 15:36:24
    Re: odata contains

    Hi @sasrsc 

     

    I have not seen any Docs that describe which Odata filters work for what connector.

     

    You could also try using the 'Filter array' action

  • sasrsc Profile Picture
    658 on 17 Nov 2020 at 18:22:13
    Re: odata contains

    do you know if there's a webpage that tells you what odata filters work with different connectors?

  • abm abm Profile Picture
    32,464 Most Valuable Professional on 17 Nov 2020 at 18:19:15
    Re: odata contains

    Hi @sasrsc 

     

    Not all the ODATA filter queries are qualified to run via Power Automate connectors.

     

    Thanks

  • sasrsc Profile Picture
    658 on 17 Nov 2020 at 16:16:54
    Re: odata contains

    Hi @Jcook thanks for that tip. I had been using that site and couldn't figure out why my specific use case was failing. 

  • sasrsc Profile Picture
    658 on 17 Nov 2020 at 16:15:10
    Re: odata contains

    So I got this to work...

    sasrsc_0-1605629379056.png

    substringof('@{triggerBody()['text']}', Title)

    Notice that the "search for this text" is before the variable that I'm searching in. I think I found that on another site.

    I tried this...

    contains(Title,'@{triggerBody()['text']}')
    and I get this error...
    The function operator 'contains' is not supported or its usage is invalid.
    clientRequestId: a5bc9929-de80-4e9e-a10a-e060a2727bbe
    serviceRequestId: a5bc9929-de80-4e9e-a10a-e060a2727bbe

    I tried flipping them...
    contains('@{triggerBody()['text']}',Title)
    and the same error.

    The person on this page is mentioning List Records in all their examples and not specifically querying a sharepoint list/document library, so I'm wondering if there are differences where SP won't accept some of those example Odata filters.  

  • Jcook Profile Picture
    7,770 Most Valuable Professional on 17 Nov 2020 at 14:38:55
    Re: odata contains

    Hello @sasrsc 

     

    This post is very helpful:

    https://diyd365.com/2019/11/20/every-power-automate-ms-flow-filter-query-you-ever-wanted-to-know-as-a-functional-consultant/

    contains does work. If you’re having issues with contains, please post the error you are getting, with your syntax

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 > Power Automate - General Discussion

#1
ankit_singhal Profile Picture

ankit_singhal 7 Super User 2025 Season 1

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 4 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 2 Super User 2025 Season 1

Overall leaderboard