web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Adding Weights to Form...
Power Automate
Unanswered

Adding Weights to Form Responses

(0) ShareShare
ReportReport
Posted on by

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!

 

2020-12-18_12-26-51.jpg2020-12-18_12-29-16.jpg2020-12-18_12-29-37.jpg2020-12-18_12-29-52.jpg

 

Categories:
I have the same question (0)
  • trad Profile Picture
    152 on at

    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...'])`

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard