cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
eddgarcia27
New Member

switch control with flow and forms

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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

8 REPLIES 8
ScottShearer
Super User III
Super User III

@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

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

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

@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

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

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

@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

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

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

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.

View solution in original post

sbrothers
Frequent Visitor

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

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (12,057)