I have a flow that enters information from a Form response into a Sharepoint list. Previous help from the community has allowed me to create a flow that inputs answers from a multiple-choice question in Forms into a multiple-choice column in Sharepoint.
The issue I have is that my Form has five multiple-choice questions and I'd like the flow to take the answers to all of these questions and add them to my SharePoint list (currently the flow is only set to add responses from one of the multiple-choice questions).
I have tried to do this by using a parallel branch in the Flow and amending the initial flow process to include the variables I need for the additional question (see attachment), however I receive the error message 'Correct to include a valid reference to 'Compose 2' for the input parameters of action 'Apply to each 2'.
Does anyone know how to solve this? Is running a parallel branch in this kind of flow possible?
I've also tried arranging the flow sequentially and this didn't work either. I creating multiple flows for each of the multiple-choice questions too but this resulted in having five entries in my SharePoint list for the same item.
Hello @SPowers29 ,
it's possible to do it in parallel, but you must use only variables / outputs that are available in each of the branches. I'd check the input of the 'Apply to each 2' to see if you use only the outputs that are available in that branch.
Many thanks for your reply, it's great to hear that it is possible to have parallel branches in this flow. Would you be able to expand on what you mean by "check the input of the 'Apply to each 2' to see if you use only the outputs that are available in that branch"? I'm a basic Power Automate user and I'm not sure what the error message was referring to or how to fix it.
The inputs are the same as they were when I was only running the flow as a single branch (i.e not parallel) and I didn't have an issue so I was confused why an issue would appear when trying to replicate the same process but with a different multiple-choice question.
in each of the branches you can use only outputs from the previous actions. In the branch on the left you can use only variable 'VarArray' and outputs from 'Compose'. In the branch on the right you can use only variable 'Engagement' and outputs from 'Compose 2' (+ all the values before you split the flow into parallel branches).
You can look on each parallel branch as a separate flow. Everything used in a parallel branch must be accessible by direct path in the flow.
Based on the error message it seems to me that you're using in the branch on the right side some data from the branch on the left side.
Thanks for the explanation. I couldn't see what data I was using from the first branch so I went back to my linear flow (that worked) and started again. Given what you said about each branch acting as a separate flow, I decided to only keep the trigger action and final output as common actions to both branches.
This seemed to work as the previous error message did not appear. However I wasn't able to save the flow as I received a different error message "Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Append_to_array_variable_2' at line '1 and column '3162' is invalid. Action 'Apply_to_each' must be a parent 'foreach' scope of action 'Append_to_array_variable_2' to be referenced by 'repeatItems' or 'items' functions"
Any idea what this means and how to solve it?
Hello @SPowers29 ,
the error tells you again that you're using some value from the left branch in the right branch, you can't do that. The cause is probably the 'Current item' dynamic content in 'Append to array variable 2'. You're using 'Current item' from the 'Apply to each' action, but you must use the 'Current item' output from 'Apply to each 2'.
Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.