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 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,865 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

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard