Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Adding Weights to Form Responses

I'm working with a user in our org that is attempting to add automatic weights to some of the multiple choice questions in their MS Form. Form response triggers the flow -> variable is changed to the weighted value -> then the data is added to an Excel table. I keep getting the error when attempting the process laid out here.


I believe I have set up my flow to mimic this, but I keep getting an error in the Switch part of the flow. 

This is the error I receive: The execution of template action 'Set variable' failed: an unexpected exception encountered when evaluating branching condition.


I am new to Flows so I am just looking for some assistance. I will post my Flow in edit mode below. Thank you!




Resolver I
Resolver I

I googled that error message and came across this post where someone had a similar error. This was happening because the form was returning a string and the switch is trying to compare it as a number, they resolved this by changing 1, 2, 3, etc. in the switch cases to "1", "2", "3" but you could probably also change the "On" field in the switch to cast the response to an int as well with an expression like `int(body('Get_response_details')?['r1234567890...'])`

Helpful resources

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (21,217)