cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Basic_User007 Kudo Kingpin
Kudo Kingpin

Re: Record Microsoft Form choice response to the SharePoint list

Has there been any formal solutions to this query at all? Again this would be really helpful for something I am working on, tried the magic formula and I can't get it to work... 

bloodoff Advocate V
Advocate V

Re: Record Microsoft Form choice response to the SharePoint list

@Basic_User007 I agree, doesn't seem to work (at least as of now).

@efisher @npatelAU Is this still working for you guys?

I myself had a solution but it does require more steps to do and requires an array.

npatelAU
Frequent Visitor

Re: Record Microsoft Form choice response to the SharePoint list

It is working for me. Thanks, @efisher for giving me the solution.  @bloodoff please refer the message from @efisher in this discussion.

bloodoff Advocate V
Advocate V

Re: Record Microsoft Form choice response to the SharePoint list

@v-xida-msft Do you think you guys might change something that will break any of these workarounds?

 

@Basic_User007, here is my version of the workaround.

 

A flow that works needs to have these core steps:

  • initialize an array variable (1)
  • remove extra symbols from Microsoft Forms string output
  • split the previous line into an array (not the same step 1)
  • append to array variable using a formula
  • create a SharePoint list item

 20181202_9.png

Where Initializing an array variable:

20181202_10.png

Removing extra symbols from MS Forms string output: 

replace(replace(replace(body('Get_response_details')?['r5beb9c2e9e4849129d94468e3db92b7a'],'","','|'), '["',''), '"]','')

20181202_11.png

Splitting the previous compose into an array: 

split(outputs('Format_form_output'),'|')

20181202_12.png

Appending to array variable using a formula:

20181202_13.png

Creating an item (in a Create Item step a Switch to input entire array option must be selected for that very multi choice field):

20181202_14a.png

Please note that if you don’t work with Microsoft Forms and already have an array of values, then the steps are just initializing an array and appending to array variable using a formula. That’s it!

 

For more details and my thought process please visit my new blog, thanks!

https://365basics.com/microsoft-flow-populate-a-multi-choice-field-in-sharepoint/

DuaneAlleman
Frequent Visitor

Re: Record Microsoft Form choice response to the SharePoint list

Thanks for sharing.  

 

I am trying your suggestion and getting this errorr:

 

The template validation failed: 'The template action 'Set_variable' at line '1' and column '3409' is not valid: "The template function 'body' is not expected at this location.".'.

 

Is the first variable in the flow (the initialize variable)?  

 

Thanks for your help!

Duane

Highlighted
DuaneAlleman
Frequent Visitor

Re: Record Microsoft Form choice response to the SharePoint list

Also - I am using this expression:

 

replace(variables(replace(variables(replace(body('Get_response_details')?['rcd59c8f4f5ef43f886bda229d6f06d73'],'","',';#')), '["',';#')), '"]',';#')


 I replaced the rcd59xxxxxxxx - with my ID for the Multiselect form field.  

 

 

bloodoff Advocate V
Advocate V

Re: Record Microsoft Form choice response to the SharePoint list

@DuaneAlleman I think you are overcomplicating the flow with another variable from what I can see here:

replace(variables(replace(variables(replace(body('Get_response_details')?['rcd59c8f4f5ef43f886bda229d6f06d73'],'","',';#')), '["',';#')), '"]',';#')

The only reason and the only place I use a variable is for an array, that's it. Note how my code doesn't have anything about "variables":

replace(replace(replace(body('Get_response_details')?['r5beb9c2e9e4849129d94468e3db92b7a'],'","','|'), '["',''), '"]','')

So if your case is getting info from Microsoft Forms and saving it into SharePoint, then make it simple (check my post above).

I know it is possible to add a variable but why doing it? 🙂

 

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Users online (8,247)