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

Community site session details

Session Id : dNzM6jNr/xYnwy0Nm9Dz3u
Power Automate - Using Flows
Unanswered

Filtering Sharpoint List Data using ODATA

Like (0) ShareShare
ReportReport
Posted on 13 Apr 2017 17:27:04 by 14

Hi All,

 

I'm trying to get a value from a Sharepoint List and looking to filter down the data set using ODATA filters.

This does'nt seem to be as intuitive as the rest of the flow structure.

 

I'm getting an error stating the expression is not valid. I can only presume that my query ont he column name is wrong as the data value i'm testing for is correct.

 

Can anyone help?

 

Header:

{ "Pragma": "no-cache", "x-ms-request-id": "f3c67e80-745d-4555-a956-23b76cdc2749", "Cache-Control": "no-cache", "Date": "Thu, 13 Apr 2017 16:17:25 GMT", "Set-Cookie": "ARRAffinity=6f87b92787b7f3b45b17b2f525a670883ff8d34bcd24b2d0eecfa033b8e3e94f;Path=/;Domain=127.0.0.1", "Server": "Microsoft-IIS/8.0,Microsoft-HTTPAPI/2.0", "X-AspNet-Version": "4.0.30319", "X-Powered-By": "ASP.NET", "Content-Length": "369", "Content-Type": "application/json; charset=utf-8", "Expires": "-1" }
 
Body:{ "status": 400, "message": "The expression \"Employee Eq Ben Daneliuk\" is not valid.", "source": "<siteURL>_api/SP.APIHubConnector.GetListItems(listName='37197a96-dbd6-4a03-923a-2b418ff43cad',queryOptions='%2524filter%3dEmployee%25C2%25A0Eq%2520Ben%2520Daneliuk')", "errors": [ "-1", "Microsoft.SharePoint.Client.InvalidClientQueryException" ] }

List Settings.pngFlow Error.png

 

I have the same question (0)
  • v-micsh-msft Profile Picture
    on 14 Apr 2017 at 11:52:39
    Re: Filtering Sharpoint List Data using ODATA

    Hi @BenDaneliuk,

     

    Would it be available to filter the SharePoint lists with Condition under Microsoft Flow?

    Add a condition to a flow

     

    Currently OData filters are not implemented yet by all connectors.

    See the response from SameerCh in the following thread:

    ODATA Filters - are these implemented yet?

     

     

    But the filter query works for SharePoint lists.

    53.PNG

    Currentlly the Filter Query under the Action Act as the 

    $filter in OData Query,

    The Order By act as the:

    $orderby

    There is no $select query implemented under the Action.

    So if you would like to return special fields from the SharePoint list (See OData reference for SharePoint REST query), you may consider submit this as an idea, to add the $Select as an available Query under the Get Items Action.

    https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

    Regards,

    Michael

     

     

     

  • BenDaneliuk Profile Picture
    14 on 19 Apr 2017 at 22:25:33
    Re: Filtering Sharpoint List Data using ODATA

    Thanks Michael,

     

    Was hoping to keep the control all within flow rather than drop out into SP designer to develop the REST commands.

    Understand the ODATA filters aren't working for all connectors. Thanks to the info.

     

    I'll have a dabble with the conditions,  but may have to bite the bullet and use the SP designer to create this work flow.

     

    Thanks

     

    Ben

  • WiggityZwiggity Profile Picture
    358 on 08 May 2017 at 13:14:17
    Re: Filtering Sharpoint List Data using ODATA

    Curious if you have gotten this to work.  I have tried every permutation imaginable and have not been able to get this to work

     

    Field Name eq 2 Part Value

    Field Name eq 2%20Part%20Value

    Field Name eq "2%20Part%20Value"

    Field Name eq '2%20Part%20Value'

    Field Name eq "2 Part Value"

    Field Name eq '2 Part Value'

    Field_x0020__Name eq 2 Part Value

    Field_x0020__Name eq "2 Part Value"

    Field_x0020__Name eq '2 Part Value'

    Field_x0020__Name eq 2%20Part%20Value

    Field_x0020__Name eq "2%20Part%20Value"

    Field_x0020__Name eq '2%20Part%20Value'

     

    Every single one has been tried, none of them work, so do Odata filters really work?

  • v-micsh-msft Profile Picture
    on 09 May 2017 at 02:33:51
    Re: Filtering Sharpoint List Data using ODATA

    Hi @WiggityZwiggity,

     

    Yes, it works.

    Please add a condition, put the corresponding field dynamic content into the first Input Box, then click advanced mode, then you should be able to find the proper field identifier:

    73.PNG

    The field name here is Testing Text, while the workable column field is marked as 'haiz'

    So if we would like to take use of this column to filter query, the formula should be:

     

    haiz eq 'TextValue'

     

    For the value part, it is the actual text, no need to replace the Space with other charactor.

    Regards,

    Michael

     

  • gamoraes Profile Picture
    1,040 on 27 May 2017 at 23:36:41
    Re: Filtering Sharpoint List Data using ODATA

    Hi @BenDaneliuk and @WiggityZwiggity

     

    I use in most of my flows the GetItens action in SharePoint and this realy works!

     

    Somethimes i and my team wrong the rest filter and the solution for us if before put in flow test in browser using the following url

    https://SHAREPOINT SITE URL/_api/web/lists/getByTitle('LIST NAME')/items?$filter=FILTER

     

    if the result in browser is ok, tou can put the FILTER inside the field in MSFlow and see the magic 🙂

     

    A MSDN page can help you if u need about using rest in SharePoint

     

    Regards,

     

    Gustavo Moraes

  • satya Profile Picture
    40 on 04 Oct 2018 at 18:19:52
    Re: Filtering Sharpoint List Data using ODATA

    how to compare persons or group fields in OData Query.  i am getting the error as below.

     

     "status"400,
      "message""The expression \"DelegationFrom eq i:0#.f|membership|venkat@infyevonik.onmicrosoft.com\" is not valid.\r\nclientRequestId: 638efdb5-b91a-4009-8cfd-20a0c3beec48\r\nserviceRequestId: 6127959e-d0b6-0000-128e-3c5f386ffa78"

  • CrispExcel Profile Picture
    15 on 16 Oct 2019 at 05:47:35
    Re: Filtering Sharpoint List Data using ODATA

    Hi,

    Am Facing the same issue.

    Does anyone know how to resolve this?

    It was working before

    "status": 400,
    "message": "The expression \"ID eq https://base365.sharepoint.com/sites/BasePowerApps/Lists/Customer\" is not valid.\r\nclientRequestId: f5922589-d2dc-4165-8438-e8c47865e1bc\r\nserviceRequestId: f5922589-d2dc-4165-8438-e8c47865e1bc"
     
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard

Featured topics

Restore a deleted flow
Loading complete