cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Zango
Advocate II
Advocate II

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.

 

9am recurrance, initialise the days to add variable9am recurrance, initialise the days to add variablecheck completion date is entered, check post completion is nullcheck completion date is entered, check post completion is nullswitch on period seems to be broken and potentially formula to create dates?switch 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
Advocate II
Advocate II

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 -Compose does not return the result of the functionCompose 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.

v-bacao-msft
Community Support
Community Support

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.
GabrielStJohn
Microsoft
Microsoft

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
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager



Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors
Users online (2,097)