Hi,
Here's a flow that handles multiple choice questions in your Forms and accurately adds to a SharePoint List.
Form:
Results:
Flow:
Steps:
Steps 1 & 2 are self-explanatory here so will skip. Let me know if you need help with those though.
The first one we will tackle is parse json. We need to parse the results of the multiple-choice question, my question name is 'Question' (see the form above).
Use the Generate from sample button and paste in the results from your get response details shown below. In my test, I selected Option1, Option2, Option5.
Next initialize a new string variable. For simplicity, I used MultipleChoice1.
Next, MANUALLY ADD, an apply to each loop and reference the body of your parse Json action. Then add an Append to string variable action and use the MultipleChoice1 variable name. In the value, add the expression
concat(items('Apply_to_each'),';#')
This essentially adds a ;# to the end of each variable (and is used in your SP List).
Next, outside of the loop, initialize another string variable. Here I call mine MultipleChoice2. Your flow should look like this so far.
Next add a condition and check if the length of MultipleChoice1 is greater than 2 characters.
One the Yes or True side, set the variable action for MultipleChoice2, shown below.
substring(variables('MultipleChoice1'), 0, sub(length(variables('MultipleChoice1')), 2))
Last but not least, create your item. The importance part here is for your multiple-choice column,
add the dynamic content for variable MultipleChoice2.
And that's it! Give it a try, works in testing.
------------------------------------------------
⭐ If this was helpful, please like and/or mark as a verified answer to help others find this too!
Always glad to help! 💯💯💯💯💯
Tom
Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn