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:
And if I run it with no filter I can see that there is a Date matching in the output:
However, running with the filter returns an empty body:
Any ideas what I might be doing wrong here?
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.
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
Hi,
I have another field called 'EndDate', and the filter does not work on that one, either.
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
Hi,
I have it hard coded here:
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",
Hi @cjacobsen,
I've tried as per your screenshot and it works fine for me.
here is a screenshot of what worked for me.
If still issue persists, you may try to hardcode the filter condition and check.
e.g. Date eq '2023-04-09'
Hi,
I already know these work. See below:
This one gets the date 2 days from now. And then:
This one strips it down to just the date.
Here's the view from edit view:
And here's the code:
Hello @cjacobsen,
Filter Query in your screenshot seems correct.
Kindly expand below 2 actions and post it to understand issue better.
However, here is a screenshot of what worked for me.
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
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:
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.
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
2. Here is the flow, using Compose to check the result
3. Result:
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