I am currently using this public template "Create a daily summary of Planner Tasks by Bucket" to pull my Planner bucket and tasks. Its working well but I would like to modify it so that when it displays Completed Tasks it only shows tasks completed this week. I would still like to see all of my non-completed tasks.
Any suggestions on how to modify the flow to show this?
Hi @orolamba210 ,
I have already answered your question in another post, but it seems that only part of the requirements have been solved, and I am trying to find a way to achieve other parts of the requirements.
To be more specific, I am trying to figure out how to only show Completed tasks that were marked as completed within that work week of the flow.
I have considered something like this. Just not sure how to write it.
I would suggest using the dayOfWeek() expression to determine the earliest completedDateTime on a task that should be included.
if you get the day of the week (Sunday=0, Saturday=7) that the flow is run (UTCNow()), you can then use the addDays() expression to subtract back to get the date of the Monday of the current week.
using the following two expressions will return the date of the most recent Monday:
basically the first Compose action is determining how many days need to be subtracted from todays date to get Monday. If today is Monday (Day of week = 1), then the first compose will multiply 1 by -1, resulting in -1 which will be added to 1, resulting in 0.
the second Compose adds that negative number to today's date to return the Monday's date. you can use this output to compare to the completedDate of a planner task to determine if you want it added or not.
keep in mind that utcNow() will return the time in UTC (GMT) timezone, so you will have to adjust for your local timezone. You can do this either manually with addHours() or with the Convert Time Zone action.
I hope this helps.
Check out the new Process Advisor community forum board!
Check out new user group experience and if you are a leader please create your group
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks