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.
Solved! Go to Solution.
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.
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.
User | Count |
---|---|
68 | |
50 | |
47 | |
27 | |
18 |
User | Count |
---|---|
26 | |
26 | |
22 | |
20 | |
19 |