Power Automate: Process multi-choice Microsoft #Forms into SharePoint List

 Figured out a way to save a multi-choice Microsoft #Forms field into a Multi Choice #SharePoint field via a singleline expression in #powerautomate

Let's explain: 

We need to transform the multiple choice Microsoft Forms field value:

[\"Option 1\",\"Option 3\"]

into a JSON formatted string: 

[ { "Value": "Option 1" }, {"Value": "Option 3" } ]

for a Multiple choice field in SharePoint

We can do this by :

json(replace(replace(replace([[FORMSFIELD]],'[','[{"Value":'), ']',' }]'),',','},{"Value":'))

If we breakdown this expression 

  1. Replace '[' by '[{"Value":'
  2. Replace ']' by ' }]'
  3. Replace every ',' by '},{"Value":'
  4. Create json string

Now you can use this in your Forms processing Power Automate

Comments