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 / Send an HTTP Request t...
Power Automate
Answered

Send an HTTP Request to Sharepoint: Filter OR?

(1) ShareShare
ReportReport
Posted on by

Hello,

I can't find the correct syntax to $filter on multiple values. Anyone come across how to do this yet?

Example:

https://mycompany.sharepoint.com/sites/test/_api/web/lists/GetByTitle('BigLis')/items?$filter=ProjectNo eq '123', '141', '154'
I need the query to return records with ProjectNo 123, 141 or 154. 
Thank you!
Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    I can get one to return with the following so I know the column is a String-type.

    Its also a Lookup column, not sure if that matters...

    https://mycompany.sharepoint.com/sites/test/_api/web/lists/GetByTitle('BigLis')/items?$filter=ProjectNo eq '123'

    I've tried these variations to no avail...

    filter=ProjectNo eq 15185 or 16236 or 16376
    filter=ProjectNo eq '15185' or '16236' or '16376'
    filter=ProjectNo eq '15185' or eq '16236' or eq '16376'
    filter=ProjectNo eq '15185', '16236', '16376'
    
  • Community Power Platform Member Profile Picture
    on at
    Error is "Bad Request"
     
    "status": 400,
    "message": "The query is not valid.\r\nclientRequestId: 30e70da3-c2c4-401a-8ab0-d7fb19129d79\r\nserviceRequestId: 1a550c9f-404e-9000-75b4-0f6e1eda22a7",
    "source": "https://mycompany.sharepoint.com/sites/_api/web/lists/GetByTitle('BigList')/items?$filter=ProjectNo%20eq%20'15185'%20or%20'16236'%20or%20'16376'",
    "errors": [
    "-1",
    "Microsoft.SharePoint.SPException"
  • Verified answer
    RezaDorrani Profile Picture
    12,143 on at

    @ericonline 

     

    Try

     

    ?$filter=ProjectNo eq '123' or ProjectNo eq '141' or ProjectNo eq '154'

    '--------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up

  • Verified answer
    v-bacao-msft Profile Picture
    on at

     

    Hi @ericonline ,

     

    Please check this similar thread and see if it helps:

    https://sharepoint.stackexchange.com/questions/163307/rest-api-filter-multiple-values

     

     

    Best Regards,

  • Community Power Platform Member Profile Picture
    on at

    Thank you @RezaDorrani and @v-bacao-msft for the solution. It worked.

    Something I noticed is that there is a limit to the length of the Sharepoint HTTP URL. I have to limit the number of characters to about ~2050 otherwise the query fails. 

    Anyone else run into this?

  • Community Power Platform Member Profile Picture
    on at

    And just another heads up... When you do exceed the ~2050 char limit in an HTTP Request, it fails with a Status 400 "Unauthorized" (which is not intuitive at all!)

     

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 323 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 183 Most Valuable Professional

Last 30 days Overall leaderboard