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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

odata contains

(0) ShareShare
ReportReport
Posted on by 678

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. 


Categories:
I have the same question (0)
  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    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

  • sasrsc Profile Picture
    678 on at

    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.  

  • sasrsc Profile Picture
    678 on at

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

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

    Hi @sasrsc 

     

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

     

    Thanks

  • sasrsc Profile Picture
    678 on at

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

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    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

  • danishpowerapps Profile Picture
    66 on at
    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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard