Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

Sharepoint Get Items filter Not Returning any Results

(0) ShareShare
ReportReport
Posted on by 11

I have a sharepoint get items connector that is set to pull items from a date 2 days in the future. I can see in the flow test results that the filter query is coming out correctly:

cjacobsen_0-1680706555255.png

 

And if I run it with no filter I can see that there is a Date matching in the output: 

 

cjacobsen_1-1680706601933.png

 

However, running with the filter returns an empty body: 

 

cjacobsen_2-1680706747201.png

 

Any ideas what I might be doing wrong here? 

  • S-Venkadesh Profile Picture
    S-Venkadesh 636 on at
    Re: Sharepoint Get Items filter Not Returning any Results

    Hi @cjacobsen ,

    Lets take advantage of Experimental Features in PowerAutomate.
    After Enabling Experimental Features, adding Filter query becomes simpler.
    Please refer below picture and try it.

    SVenkadesh_0-1681199712303.png

    This way you can find out the correct internal name of the Column. Then switch back to previous by toggle off experimental features and rewrite the filter condition.

    Please hit thumbs up, if it helps!

    Best Regards,
    Venkadesh Sundaramurthy

  • cjacobsen Profile Picture
    cjacobsen 11 on at
    Re: Sharepoint Get Items filter Not Returning any Results

    Hi, 

     

    I have another field called 'EndDate', and the filter does not work on that one, either. 

  • S-Venkadesh Profile Picture
    S-Venkadesh 636 on at
    Re: Sharepoint Get Items filter Not Returning any Results

    Hi @cjacobsen,

    I feel like, it's something to do with internal name of Date field.
    You may try to create new Date field with name 'TestDate' and try to use in filter condition.

    Please hit thumbs up, if it helps!

    Best Regards,
    Venkadesh Sundaramurthy

  • cjacobsen Profile Picture
    cjacobsen 11 on at
    Re: Sharepoint Get Items filter Not Returning any Results

    Hi, 

     

    I have it hard coded here: 

    cjacobsen_3-1681141744122.png

     

     

    Still no results. And still if I run it without a filter I can see an entry matching that date: 

    "Date":"2023-04-14","EndDate":"2023-04-21","Created":"2023-03-31T18:08:03Z","PrimaryOn_x002d_call":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",

  • S-Venkadesh Profile Picture
    S-Venkadesh 636 on at
    Re: Sharepoint Get Items filter Not Returning any Results

    Hi @cjacobsen,

    I've tried as per your screenshot and it works fine for me.
    here is a screenshot of what worked for me.

    SVenkadesh_0-1681075417737.png

    If still issue persists, you may try to hardcode the filter condition and check.

    e.g. Date eq '2023-04-09'

  • cjacobsen Profile Picture
    cjacobsen 11 on at
    Re: Sharepoint Get Items filter Not Returning any Results

    Hi, 

     

    I already know these work. See below: 

    cjacobsen_0-1681073407798.png

     

    This one gets the date 2 days from now. And then: 

     

    cjacobsen_1-1681073440939.png

    This one strips it down to just the date. 

     

    Here's the view from edit view: 

    cjacobsen_2-1681073549571.png

    And here's the code: 

     

    cjacobsen_3-1681073579366.png

     

  • S-Venkadesh Profile Picture
    S-Venkadesh 636 on at
    Re: Sharepoint Get Items filter Not Returning any Results

    Hello @cjacobsen,

    Filter Query in your screenshot seems correct.

    Kindly expand below 2 actions and post it to understand issue better.

    SVenkadesh_1-1681071522328.png

     

    However, here is a screenshot of what worked for me.

    SVenkadesh_2-1681072174268.png

     

     

  • Re: Sharepoint Get Items filter Not Returning any Results

    Hi @cjacobsen 

     

    Could you please show how you populate the Date in filter query?

    If possible, could you also share the action's output used in the Body in filter query?

     

    Thank you.

     

    Best regards,

    Sylvia

  • cjacobsen Profile Picture
    cjacobsen 11 on at
    Re: Sharepoint Get Items filter Not Returning any Results

    Hi Sylvia, 

     

    Apologies if it was unclear. If you review my original comment you can see that I already have this filter in place and that it is not returning any results even though without the filter I can see a result which matches. Here is my full flow below: 

     

    cjacobsen_0-1680787513942.png

     

    When testing this does not return results but as I mentioned in my original statement there are results if I run with no filter that include a date which matches the filter.

  • Re: Sharepoint Get Items filter Not Returning any Results

    Hi @cjacobsen 

     

    Do you have a column to store the date in your SharePoint list? 

    Would you like to filter the date stored in that column that is equal to the date 2 days in the future?

     

    Please try the formula in Get items Filter Query:

     

    ColumnNameInSharePointList eq '@{addDays(utcNow(),2,'yyyy-MM-dd')}'

     

     

    I have made a simple test for your reference:

    1. Here is the SharePoint list

    vpeijunzmsft_0-1680763287645.png

    2. Here is the flow, using Compose to check the result

    vpeijunzmsft_1-1680763464247.png

    3. Result:

    vpeijunzmsft_2-1680763534180.png

    The formula 

    ColumnNameInSharePointList eq '2023-04-08'

    also works well in the filter query.

    Please also check if the date in the SharePoint list matches the formula output.

    Hope it helps!

     

    Best regards,

    Sylvia

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard

Featured topics