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

Unable to use the same value in two different parallel branches of an email reminder flow

I am trying to set up a flow whereby the flow will look at a SharePoint date field and compare it to today's date.  I am trying to set it up so that a single flow will do two things: compare the SharePoint field to todays date and compare a SharePoint field to a date 30 days in the future.  If the flows are separated into two distinct flows, they work fine.  However, when combined into parallel flows, it seems that the date field that is used can only be used once by one branch of the parallel flow.  I keep getting the warning: "The template validation failed: 'The inputs of template action 'ReminderDate_+30days' at line '1 and column '2657' is invalid. Action 'Apply_to_each' must be a parent 'foreach' scope of action 'ReminderDate_+30days' to be referenced by 'repeatItems' or 'items' functions.'" when I try to add this compose to the second branch.

Code used for the first ReminderDate is: "addDays(items('Apply_to_each')['ReminderDate'],0,'yyyy-MM-dd')"

Code used for the ReminderDate plus 30 is: "addDays(items('Apply_to_each')['ReminderDate'],30,'yyyy-MM-dd')"

Can this be done in Flow, or will I need to make another column in SharePoint.

Capture.JPG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Unable to use the same value in two different parallel branches of an email reminder flow

Hi @BioDave,

 

I have tested on my side and find the same issue, and I figure it out finally.

Your input:

Code used for the first ReminderDate is: "addDays(items('Apply_to_each')['ReminderDate'],0,'yyyy-MM-dd')"

Code used for the ReminderDate plus 30 is: "addDays(items('Apply_to_each')['ReminderDate'],30,'yyyy-MM-dd')"

 

You need to tweak (Red marked):

Code used for the first ReminderDate is: "addDays(items('Apply_to_each')['ReminderDate'],0,'yyyy-MM-dd')"

Code used for the ReminderDate plus 30 is: "addDays(items('Apply_to_each_2')['ReminderDate'],30,'yyyy-MM-dd')"

 

Please have a try, I hope it can help you.

Best Regards,

Community Support Team _ Lin Tu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 REPLY 1
Community Support Team
Community Support Team

Re: Unable to use the same value in two different parallel branches of an email reminder flow

Hi @BioDave,

 

I have tested on my side and find the same issue, and I figure it out finally.

Your input:

Code used for the first ReminderDate is: "addDays(items('Apply_to_each')['ReminderDate'],0,'yyyy-MM-dd')"

Code used for the ReminderDate plus 30 is: "addDays(items('Apply_to_each')['ReminderDate'],30,'yyyy-MM-dd')"

 

You need to tweak (Red marked):

Code used for the first ReminderDate is: "addDays(items('Apply_to_each')['ReminderDate'],0,'yyyy-MM-dd')"

Code used for the ReminderDate plus 30 is: "addDays(items('Apply_to_each_2')['ReminderDate'],30,'yyyy-MM-dd')"

 

Please have a try, I hope it can help you.

Best Regards,

Community Support Team _ Lin Tu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us 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: 267 members 4,870 guests
Please welcome our newest community members: