cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmistry
Post Prodigy
Post Prodigy

How to create recurring tasks in SharePoint task list using recurrence trigger

Hi, 

 

I am using SharePoint OOTB task list in classic UI. I am aware that the recurring task is something not availabe in the ootb task list. I have a frequency choice column with choices: Annually, Monthly, Semi Annually and Quarterly. Also a flow that triggers when a task is marked as completed, when ran, it creates another task with metadata of the competed task and a new due date based o frequency value. Below is the screenshot.

 

Capture.PNG

Above is the flow for case when status is completed and frequency is Monthly.

Due Date formula: 

addDays(startOfMonth(addToTime(triggerBody()['DueDate'],1,'Month')),sub(dayOfMonth(triggerBody()['DueDate']),1),'yyyy-MM-dd')
 
Similarly I have three more flows setup for each remaining frequency value. The formula above for due date generates a new due date value based on frequency value and previous due date so since its monthly. It keeps the day value same but adds a month to the date.
 
However the above flow is not something that end client is agreeing functionality wise, they do not want recurring task to be added when a task is marked as completed. There will be a case when a task due on 3/2 is not yet marked as completed so new task for 4/2 won't be created until 3/2 is marked as completed so this is why above design is not suitable. So ideally they would like to see 4/2 task created even though 3/2 is not marked as completed.
 
I am running out of thoughts and options, I am looking to see if there is a way to create recurring tasks based on frequency value using the recurrence trigger available in flow and not by item created or modified trigger.
 
 
Can anyone shed some light on the recurring automation. 
1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

HI @dmistry ,

 

Do you want to create recurrence tasks using trigger Recurrence?

Please just add the trigger Recurrence, then get items from the Tasks list.

Add a Switch cases for each frequency so that you won’t need to create several flows for each remaining frequency value.

Under each case, add corresponding function to create recurrence tasks.

The function used in the Due date field is (got monthly frequency):

addDays(startOfMonth(addToTime(items('Apply_to_each')?['DueDate'],1,'Month')),sub(dayOfMonth(items('Apply_to_each')?['DueDate']),1),'yyyy-MM-dd')

1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-yamao-msft
Community Support
Community Support

HI @dmistry ,

 

Do you want to create recurrence tasks using trigger Recurrence?

Please just add the trigger Recurrence, then get items from the Tasks list.

Add a Switch cases for each frequency so that you won’t need to create several flows for each remaining frequency value.

Under each case, add corresponding function to create recurrence tasks.

The function used in the Due date field is (got monthly frequency):

addDays(startOfMonth(addToTime(items('Apply_to_each')?['DueDate'],1,'Month')),sub(dayOfMonth(items('Apply_to_each')?['DueDate']),1),'yyyy-MM-dd')

1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Kathomsen
Advocate I
Advocate I

This requirement comes up a lot. Thanks

Renato_LTA
Frequent Visitor

Hello, I'm trying to achieve a similar result for a Sharepoint Task list but I'd like to duplicate the items based on the recurrence field.

E.G.

I need to insert a tast called Task 1 which has a MONTHLY recurrence. Upon saving, I'd like the flow to create 11 identical tasks along with the one just created, each of them shifted by a month.

Same goes for any other recurrence: 

Weekly - 53 times (more or less)

Daily - ~210 (working days)

Semesterly - 2 times

Yearly - 1 time

 

Is this doable with Microsoft Flow?

Thanks in advance,
Renato

@Renato_LTA hey may be you can setup a checklist template (a separate list) in sharepoint and log all 11 tasks in there, then in your existing flow based on recurrence , you fetch the tasks from template, do apply all-add create item action in there. This way you can create all 11 tasks as long they all are part of the template.

@dmistry  thank you for the quick reply. I'm ok with creating a separate list with all my expected combinations, but I'm not sure to fully understand how I can trigger automatic item creation based on this list.

Can you deepen that?

Thanks in advance

R

JoanaVB
Advocate I
Advocate I

I just wanted to add that the fields you choose for the coditions must be the "Status Value" and not just "Status" and "Reocurrence Value" instead of just "Reocurrence" field. It took me a couple of hours to figure this out and I hope it saves some time to the future readers of this solution! Thanks for the suggestion. After this change it worked just fine! I hope microsoft developes the out of the Box possibility of reocurring Tasks and Events soon. I voted in the uservoice. 

tlevinson
New Member

This formula worded great for recurring monthly update to the date: 

Due Date formula: 

addDays(startOfMonth(addToTime(triggerBody()['DueDate'],1,'Month')),sub(dayOfMonth(triggerBody()['DueDate']),1),'yyyy-MM-dd')
 
What is the formula to do the say thing for Weekly and Annually?
 
Thank you

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

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

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (55,808)