I am using an OOTB task list in SPO. The only custom metadata column I have is titled as Frequency (choice column) with choices: Annually, Quarterly, Monthly, Semi-Annually. When tasks are created, they are tagged with appropriate frequency choice value.
So now, when the task is marked as completed then I want to re-add that task with an updated due date. So probably using when item is created or modified trigger and then check task that are completed as condition and re-create the item in the same list using Create item action.
Now the main thing is updating the due date here based on Frequency value once a task is completed. So if Due Date for quarterly task is 2/15 then once marked as completed, it should be re-added to the task list with due date 5/15 (simply adding 3 months), similarly semi annually would require adding 6 months, annually requires adding a year, monthly would require adding one month to the due date value.
Can someone help me with the flow solution, thanks in advance.
Hi @dmistry .
I have made a test on my side to create a sharepoint list as below:
The Frequency column and Status Column are both choice type column.
Frequency column with choice:Annually, Quarterly, Monthly, Semi-Annually
Status Column with choice:Completed,NotCompleted
And you could refer to screenshot below to create the flow:
1.Make sure to choose the Status Value dynamic content in the Condition.
2. The expression in the Compose as below:
3.The expression in the Due Date column as below:
When an item is created in the list as below:
The flow would run successfully as below:
An item would be created in the sharepoint list as below:
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-yuazh-msft thanks for the solution.
I am using SharePoint OOTB Task list not custom list, I used the same flow you provided for task list, but create item action skips. Compose action does return appropriate integer value based on frequecy column value, for example for Annually it returns 12, Monthly returns 1 etc. I do have notion of adding sub tasks to certain tasks so there were couple of apply to each block added by flow, one for predecessor and other for assigned to claims. Flow run shows successfully but create item does not execute.
For my use case, even if a sub task is marked as completed, i have to make sure that its added again as a sub task under appropriate parent task.
P.S: Looks like the issue is with the Apply to each blocks, the moment I took both apply to each off, create item works, but then the question is, how will it work if a sub task is marked as completed, currently its creating it as a separate task with an updated due date and I can't have that.
@v-yuazh-msft , the formula looks a bit off as well, not doing the calculation right.
I have Due Date value set as 3/1/2019 and since frequency value was quarterly, it resulted into due date as '5/30/2019' . So its basically adding 90 days to the resulting due date and not the Months, it should be resulted into 6/1/2019.
@v-yuazh-msft Any updates on this?
@v-yuazh-msft Hi, I am still waiting you hear about any update on your end.
Also looks like it does not work well with the task list in sharepoint, i am using a task list not a custom list. The assignedto column is people picker. The same flow you mentioned if you try to use it with task list then under create item action, assinged to claims need to mapped to dynamically assigned to display name from trigger body and flow miserably fails. Any thoughts?
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
We've given our badges an overhaul and also added some brand new ones!
Learn how to build the business apps that you need.
Find out where you can attend!
Watch & learn from the Power Automate Community Video Gallery!