cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TheOpeningBat
Helper III
Helper III

Get Sharepoint List - Filter condition to get data if todays's date - 1 is between start date & end date

I have a flow in which I get data from sharepoint list which has start date & end date columns.

 

In the flow, for Get Sharepoint items action, what should i add in the filter condition to get the data if todays date - 1 is between start date & end date.

 

Any help would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi!

Both approaches are valid. Pleaae note Filter query expects OData expressions, whose syntax is slightly different than WDL. The good point is, if you activate experimental features, you can  use WDL and the editor will convert it into OData.

On how to activate experimental features

https://dynamicsbackpage.wordpress.com/2020/02/20/new-experimental-features-in-power-automate/

On how the editor converts wdl into odata:

https://mobile.twitter.com/mydevexperience/status/1337154255636078594

Odata Great stuff here:

https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/amp/

Please give it a try and let us know your progress



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

3 REPLIES 3
efialttes
Super User
Super User

Hi!

You are using 'Filter array action block, right?

If so, click on 'Edit on advanced mode' and type the following WDL expression

 

 

 

 

 

(less(item()?['<YourInternalEndDateColumnName>'],addDays(utcNow(),-1)),greater(item()?['<YourInternalStartDateColumnName>'],addDays(utcNow(),-1)))

 

 

 

 

You can figure out which are the internal column names from your target SP columns by following the steps provided here
https://powerusers.microsoft.com/t5/Building-Flows/Sort-in-GET-ITEMS-by-column-with-space/td-p/69396...

 

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



TheOpeningBat
Helper III
Helper III

Hi @efialttes 

Thanks for your reply. I am using the Get items action for Sharepoint, can I use the expression you provided in the Filter query?

Please suggest. Thanks.

Hi!

Both approaches are valid. Pleaae note Filter query expects OData expressions, whose syntax is slightly different than WDL. The good point is, if you activate experimental features, you can  use WDL and the editor will convert it into OData.

On how to activate experimental features

https://dynamicsbackpage.wordpress.com/2020/02/20/new-experimental-features-in-power-automate/

On how the editor converts wdl into odata:

https://mobile.twitter.com/mydevexperience/status/1337154255636078594

Odata Great stuff here:

https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/amp/

Please give it a try and let us know your progress



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,527)