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 Platform Community / Forums / Power Automate / switch control with fl...
Power Automate
Answered

switch control with flow and forms

(0) ShareShare
ReportReport
Posted on by 6

I'm trying to use a switch taking answers from microsoft Forms, the anwsers are multiple option, but the output of the form is ["Answer1"] so the switch have an error:

The template validation failed: 'The template action 'switch' at line '1' and column '8589' is not valid: the value '[ "Legal" ]' specified for 'case' property in switch case 'Case' is not allowed. Only values of types string, number or a '@parameters()' expression that evaluates to a number or a string is allowed.'.
How can i use the answer to do some actions with switch? If switch doesn´t admite the symbol [ ]
I need use these answers thats the requariment

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @eddgarcia27:

     

    Try initializing and setting a string variable to the value returned by Forms.  Then reference the variable in your switch statement.

     

    If this addresses your issue, please mark your post as Solved.

     

    Scott

  • eddgarcia27 Profile Picture
    6 on at

    Hi, how can i change the value?

    The change is on Microsoft forms or i have to add another step on my flow?

     

    Thanks Scott

  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @eddgarcia27 :

     

    No change to Forms is required - see my screen shots below and post here of you have questions.

    My Form has a choice question asking "Who is your favorite Stooge?".  Responses are Moe, Larry and Curly.

     

    Stooge1.jpgStooge2.jpg

     

    If this solves your problem, please mark your post as Solved.

     

    Scott

  • eddgarcia27 Profile Picture
    6 on at

    I'm trying but in the output still includes [" "]
    i copied the same that you show me but doesn't work

     

    I have to do many combinations with those answers, Option 1 with option 2, option 3 with option 1.. etc

  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @eddgarcia27 :

     

    Please post a screen shot of your Flow.  That will make it much easier to assist.

    When proposing my solution, I did not understand that you coould have more than 1 choice selected.

     

    Scott

  • eddgarcia27 Profile Picture
    6 on at

    So there is, i created the same that you, but Microsoft forms sends the value with [" "]
    Sorry when i created the flow i had the language in Spanish

    Untitled.pngUntitled.pngUntitled.pngUntitled.pngUntitled.png

  • Verified answer
    v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @eddgarcia27,

     

    Have you set the Choice type question to allow Multiple answers as below:

    Capture.PNG

     

    If the question is setted to allow Multiple answers, the question answer would with type ["Option 1"].

     

    If you would always have only one answer in the question, please don't allow Multiple answers for the question.

    Capture.PNG

    And then the flow would run successfully as below:

    Capture.PNG

     

    Best regards,

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • sbrothers Profile Picture
    24 on at

    Still have this issue as well... none of the solutions above worked. 

  • 26figuringitout Profile Picture
    2 on at

    @ScottShearer On the first image of your solution, what did you input in the "Select an output from previous steps" field? List is not an option that I see.

  • CROKat Profile Picture
    155 on at

    In the "Apply to Each" box, what do you put for "select an output from previous steps" ? I think this is exactly what I am trying to get my form to do. But I'm not sure how to make it work!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard