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 Automate
Answered

Switch

(0) ShareShare
ReportReport
Posted on by 24

My switch inside the flow won't pass for true but they are they same value..
I removed the quotes with this function since the switch wasn't passing, replace(variables('Location'),'"','')

I am trying to pass the location answer from a forms submission through to create events on correct calendars. 

 

Not sure how to fix this, it is quiet frustrating..

 

 

power1.PNG

Categories:
I have the same question (0)
  • sbrothers Profile Picture
    24 on at

    Little context: The form submission has 3 locations and employees can select multiple locations. Ever since adding the feature, all my single location switches don't pass even though the value's are the same.. power 2.PNG

  • Verified answer
    sbrothers Profile Picture
    24 on at

    I found the solution. Turns out with the multiple answers enabled on the forms the output becomes weird for switches. I have this function for the first part of my switch for the single answer and multiple awnsers: substring(body('Get_response_details')?['rc13cf4803ea24475a6968fdf76e1fd4b'],1,sub(length(body('Get_response_details')?['rc13cf4803ea24475a6968fdf76e1fd4b']),2))

    and then I  initialize and set a variable for the answer and plug that into a compose function: replace(variables('Location'),'"','')  to remove the extra quotes and brackets so the switch will match the value. The first "Compose" will validate the default switch for multiple answers and the Compose 3 Validates for single answers. I then have my first switch matching to the output of my Compose 3 for single answers and a branching switch under it's default for multiple answers where it matches to the first Compose.Preparing the two different outputs for single and multiple answers.Preparing the two different outputs for single and multiple answers.Shows my branching switches that look at different outputs to match a valueShows my branching switches that look at different outputs to match a valueFlow running successful for single answers.Flow running successful for single answers.Flow now running successful for multi answers.Flow now running successful for multi answers.

  • sbrothers Profile Picture
    24 on at

    I hope someone who needs this solution finds it! I could not find anything that actually fixed Multiple Answers in forms to match with switches that have single and multiple values. 

    Cheers! 

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