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.

View solution in original post

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.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 334 members 6,027 guests
Please welcome our newest community members: