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!



View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (3,250)