cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pketeldijk
Frequent Visitor

Flow filter by current week

Hi,

 

I have a SharePoint list with a column [StartDate] and a column [EndDate]. I am creating a flow that every friday sends an email in pdf to my boss with the job orders from that week that have been planned or done. 

 

Everything works just fine except the filter query. The query should only look if either [StartDate] or [EndDate] falls in the current week and filter current items.

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User III
Super User III

Hi @pketeldijk 

 

That's the default limit of Get Items. Set the pagination and increase the limit.

 

 

Click the ellipses (three dots) on the “Get items” item
Settings
Under Pagination >Toggle on pagination if your list uses pagination
Enter the new limit of items
Click Done
Update Flow

 

Please see below.

 

image.png

 

image.png

 

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

7 REPLIES 7
abm
Super User III
Super User III

Hi @pketeldijk 

 

You need to use greaterOrEquals and lessOrEquals expression to check the start and end dates.

 

Please see the below link which explains how to use the above expressions.

 

https://powerusers.microsoft.com/t5/Building-Flows/SharePoint-Get-Items-filter-by-start-date-and-end...

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
pketeldijk
Frequent Visitor

To what do I compare StartDate/EndDate? I can't find an expression for current week.

 

StartDate - greaterOrEquals - (currentweek?)

EndDate - lessOrEquals - (currentweek?)

 

 

Hi @pketeldijk 

 

You mentioned "SharePoint list with a column [StartDate] and a column [EndDate]".  Whats the data type of these columns? Date or Datetime? 

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
pketeldijk
Frequent Visitor

Date only

Hi @pketeldijk 

 

Thanks for the quick reply. You mentioned you are planning to run on every Friday so if your week  starts from Monday then we need to find the start date of Monday using the below expression

 

addDays(utcNow(),-4,'yyyy-MM-dd')
 
If your weekend  ends on Friday then you need to use the below expression
 
utcNow('yyyy-MM-dd')
 
Now you have two dates to compare with your list.
 
Thanks
 


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
pketeldijk
Frequent Visitor

Thank you for your input.

 

Could you please look at the attached image and tell me what I did wrong? The flow send me the first 100 of 200 records.

 

Flow1.jpg

abm
Super User III
Super User III

Hi @pketeldijk 

 

That's the default limit of Get Items. Set the pagination and increase the limit.

 

 

Click the ellipses (three dots) on the “Get items” item
Settings
Under Pagination >Toggle on pagination if your list uses pagination
Enter the new limit of items
Click Done
Update Flow

 

Please see below.

 

image.png

 

image.png

 

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (40,223)