I am working with SharePoint online Task List (OOTB). I have a flow setup that triggers when a task is marked as completed and if true it then creates another task as recurring task (all fields info are grabbed from completed task),except Due Date value.

I have a choice column called Frequency with values: Annually, Semi-Annually, Monthly, Quarterly. So the goal is when a recurring task is added by flow, prior to that it checks Frequency column value of completed task and if its Quarterly then update the due date by adding 3 months.

So for example if due date of task completed is 5/30/2019 and frequency is Quarterly then new due date i See is 8/28/2019 but in theory it should be 8/30/2019, I don't want to update days just Month value.

enter image description here

Compose formula: if(equals(triggerBody()?['Frequency']?['Value'],'Annually'),int(12),if(equals(triggerBody()?['Frequency']?['Value'],'Quarterly'),int(3),if(equals(triggerBody()?['Frequency']?['Value'],'Monthly'),int(1),if(equals(triggerBody()?['Frequency']?['Value'],'Semi-Annually'),int(6),null))))

Due Date formula under create item: addToTime(triggerBody()?['DueDate'],outputs('Compose'),'Month')

The flow works and gives me an updated due date based on frequency but I just want the month number to be updated for all frequency except Annually. For annually it should just update the Year value.

Samples below: 1. Monthly:> 2/27/2019->> 3/27/2019 2. Quarterly: 2/28/2019->> 5/28/2019 3. Semi Annually: 2/26/2019-->>8/29/2019 4. Annually: 3/1/2019-->>3/1/2020.

Can someone help, thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.