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

Announcements

News and Announcements icon
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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 481

#2
11manish Profile Picture

11manish 278

#3
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

Last 30 days Overall leaderboard