cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Zango
Level: Powered On

Reoccurance to send email if completion date + set period is less than current date does not work

Hi all,

 

Looking for a little help for building my flow, for our process we need users to add post completion comments after an action has been completed.

 

The original actionee picks the review period for the action (1,2,3 or 6 months). When the action is set to complete a flow adds todays date to the completion date field. The flow should run every day and if the post completion review is not filled and the action is complete and the current date is more than the completion day + review period then it should send an email to the actionee to get them to fill in the post completion review.

 

image.png9am recurrance, initialise the days to add variableate.pngcheck completion date is entered, check post completion is nullissues.pngswitch on period seems to be broken and potentially formula to create dates?err.png

 

Is the addDays part correct?

 

Why does the period switch fail? if i have apostrphes around 0, 1 then the flow complets but 1 does not = '1' so the days to add is never added

3 REPLIES 3
Zango
Level: Powered On

Re: Reoccurance to send email if completion date + set period is less than current date does not wor

I have changed my review period to the format "30 days", "60 days" ect rather than "1", "2" as the switch didn't seem to work correctly with pure numbers - now the flow actually goes down the right route.

 

I have found that the Compose function does not do what I expected -image.pngCompose does not return the result of the function

instead it just gives me the text and adds in my variables, but at least I know the variables have the right information! (date and 30 days)

 

I have now made this compose function only the CompletionDate - I do not understand why i need to compose this in order to use the CompletionDate later on, but hey it works.

 

and then in my next condition i compare to the add days function:

addDays(outputs('completion'), variables('daysToAdd'))

image.png

 

And I have changed my "Increment variables" back to "Set variable"

 

Now It seems to be working I will keep an eye on it.

Community Support Team
Community Support Team

Re: Reoccurance to send email if completion date + set period is less than current date does not wor

Hi @Zango,

 

Has your problem been solved?

The formula filled in Compose should be written in Expression and then applied to Inputs instead of writing formulas directly in Inputs.

And you need to use items(‘Apply_to_each’)[‘Column name’] to traverse the value of this column.

Like:

formatDateTime(addDays(items('Apply_to_each')['CompletionDate'],variables('daysToAdd')),'dd-MM-yyyy')

29.PNG

 

Correct result:

30.PNG

If you still have problems, feel free post back.

 

Best Regards,

Barry

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

Re: Reoccurance to send email if completion date + set period is less than current date does not wor

Hey, @Zango!

Thank you for posting on the Flow Community Forum! It appears as though @v-bacao-msft would like some more information in order to further assist you properly with your issue. Please share any additional information that was requested in order to decrease the amount of time that it will take for you to be assisted!

Thank you for being an active member of the Flow Community!

-Gabriel
Flow Community Manager

-Gabriel
Microsoft Flow Community Manager

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 240 members 5,043 guests
Please welcome our newest community members: