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

Slect the Planner task that is due the soonest in a specific bucket and then update the progress status

Hello,
 
I am trying to build a flow that will select the Planner task that is due the soonest in a specific bucket and then update the progress status to in progress.
 
An added bonus would be the ability to email the person the task is assigned to so they know the status changed.
 
I am new to Flow, so I am at a loss where to even start.
 
Thank you in advance for your help!
1 ACCEPTED SOLUTION

Accepted Solutions

I figured it out.  It took quite a while, but here is what worked for me:

 

I initialized an array variable, listed my tasks, and then ran an apply to each looking for the part of the name that identifies the tasks I am looking for and excludes completed tasks.

 

philalethes_0-1597868204939.png

 

Then, I appended to that array the due date values with this formula:  

 
ticks(items('Apply_to_each')['dueDateTime'])
 

 Image2.png

Then, I listed my tasks again and then ran an apply to each looking for the part of the name that identifies the tasks I am looking for, excludes completed tasks, and looked in the array for the minimum date that I wrote into the array in the previous step.

 

Note: I had to update the ticks formula to point at the current Apply to each 5 section.

 

ticks(items('Apply_to_each_5')['dueDateTime'])

min(variables('DateDue'))

 

 

Image3.png

  

Then, upon finding the matching min date, I simply updated the task and sent a message to the user identified in the task.  

 

 

Image4.png

 

 

 I hope this helps someone else, too!

 

View solution in original post

3 REPLIES 3
ChristianAbata
Super User
Super User

hi @philalethes  you can follow my example

 

examplehelp.PNG

 

as you see you can get all tasks from planner and then you can compare to send and email if the date is some due date



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Hi @ChristianAbata ,

 

Thanks for the suggestion!

 

I am afraid it isn't quite getting at what I am trying to accomplish, though.

 

I already have the beginning of a Flow created that creates a new task in a specific bucket when another task is completed.  The next piece I am stuck on is figuring out how the Flow can find the next task that is due soonest in that specific bucket, changing its status to "in progress", and then emailing the person it is assigned to.

philalethes_0-1597698474310.png

 

If it is easier to search for this task that is due soonest by part of a name, instead of by a bucket id, that would work for my set up as well.  My Flow already looks for a Title that includes "Mammo Task" which could be used for this next component as well.

 

Do you have any ideas on how to build a flow that selects the Planner task that is due the soonest in a specific bucket and then update the progress status?

 

Thanks!

 

---

Edit:

 

I have tried working on finding the soonest due date portion a bit and am not having luck.  It seems that creating an array variable may be a part of the solution, but I keep getting errors.  Any ideas?

 

philalethes_0-1597785505458.png

 

philalethes_1-1597785534981.png

 

I figured it out.  It took quite a while, but here is what worked for me:

 

I initialized an array variable, listed my tasks, and then ran an apply to each looking for the part of the name that identifies the tasks I am looking for and excludes completed tasks.

 

philalethes_0-1597868204939.png

 

Then, I appended to that array the due date values with this formula:  

 
ticks(items('Apply_to_each')['dueDateTime'])
 

 Image2.png

Then, I listed my tasks again and then ran an apply to each looking for the part of the name that identifies the tasks I am looking for, excludes completed tasks, and looked in the array for the minimum date that I wrote into the array in the previous step.

 

Note: I had to update the ticks formula to point at the current Apply to each 5 section.

 

ticks(items('Apply_to_each_5')['dueDateTime'])

min(variables('DateDue'))

 

 

Image3.png

  

Then, upon finding the matching min date, I simply updated the task and sent a message to the user identified in the task.  

 

 

Image4.png

 

 

 I hope this helps someone else, too!

 

Helpful resources

Top Solution Authors
Users online (3,816)