Forms Pro to Power Automate for multiple answers

Copper Contributor

Hi all,

 

I hope you are well...

 

I currently have been using Forms Pro and Power Automate to create/ update records bases on responses which works fine for all questions in Drop downs/ text etc were there is only one answer. However when I use a multi checkbox option were a responded can have multiple answers this does come through in forms pro but any of my conditions in Power Automate do not pick it up!

I have a switch control which never runs because the data comes back with ["under 11"] and the switch never picks it up.

 

Example Question:'

 

https://community.dynamics.com/resized-image/__size/640x480/__key/communityserver-discussions-compon...

Expression in Power Automate:

 

pastedimage1583754075414v2.png-640x480.png

 

 

pastedimage1583754108543v3.png-640x480.png

I have tried putting in the following around : ' and ". Does anyone have any advice on this?

 

Thanks

 

Justin

7 Replies

Hi Justin ( @Moodycrmguy)  as it's a Forms question that allows multiple answers we need to split out each answer and add it into a string variable. In my example below the user can select 1 or more sessions to attend and we're then creating a Planner task.

 

0-Form.png

 

After the When a new response is submitted trigger and Get response details action we need to add an Initialize string variable which I've called varSession.

 

The next action is a Parse JSON action and the syntax you need to add is

 

{
    "type": "array",
    "items": {
        "type": "string"
    }
}

 

1-Trigger-InitVar-Parse.png

 

Next add an Apply to each control and select Body from the dynamic content. Inside the Apply to each add an Append to string variable, select the name and for the value select Item from the dynamic content.

 

The next action is to add the Switch control and select the string variable from the dynamic content.

 

2-Apply-Append-Switch.png

 

In each switch case I've then added the Planner Create a task action but your flow will have a different action. However you do need to reset the variable back to null before the next multi-choice answer is looked at, so add a Set variable, select it and in the value field add the expression null

 

3-SwitchCase-CreateTask-SetVariable.png

 

In my form I selected both SharePoint and Power Automate as the sessions to attend and this is the result of the SharePoint answer. The Power Automate answer went down its switch case channel correctly as well.

 

4-Result.png

 

Hope that helps.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@RobElliott 

 

Hi Rob, thank you so much for this very useful - I have followed your steps and using the following Question answers:

 

Moodycrmguy_0-1583854276412.png

 

However it still does not trigger any outcomes and it seems to connect the two answers together?

Moodycrmguy_1-1583854397642.png

Thanks

 

Justin

 

 

 

@Moodycrmguy without seeing the steps in your flow I can't be sure but it looks like you're not adding the set variable action (see the 5th screenshot in my earlier post) in each case channel to re-set it to null  which is why it's combining the outputs.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@RobElliott  Thank you for coming back to me and all your support. 

Moodycrmguy_0-1583936918118.png

 

I have done that step and still I get the same outcome. 

 

This also might be useful in terms of seeing what is going on in the entire flow:

Moodycrmguy_2-1583937036271.png

 

Moodycrmguy_1-1583936995656.png

Moodycrmguy_3-1583937188391.png

Moodycrmguy_4-1583937264553.png

 

 

@RobElliott 

 

Moodycrmguy_0-1583937356050.png

 

any advice? it is when I get to my target audience switch that this falls off. it looks like the string works but it does not seem to pick up the spacing strangely

 

@Moodycrmguy when I mentioned seeing the steps in the flow I meant screenshots of the edit page, not the results page. You can blur out site names and any sensitive info but it's that way that we can see more easily what the logic is and what the problem might be. So if you can do that I'l have another look.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@RobElliott 

 

Hi Rob

 

I hop you can help with a slight variation of your response to this query on handling multiple answers from a Microsoft Form.  I'm new to using power automate and this forum.

 

Working from the example you provided if we need to send ONE email the say the product owner of Sharepoint and the product owner of Power Automate, how could this be achieved?

 

Form response = Sharepoint & Power Automate selected by the user

 

One Email Sent To = productowner@sharepoint.com; productowner@powerautomate.com; [using switch to assign the product owner's email address to the product selected]

 

We want each product owner to be aware the user has expressed interest in the other product so the product owners can determine the best action between them. 

 

Kind regards

Jon