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
- Replace '[' by '[{"Value":'
- Replace ']' by ' }]'
- Replace every ',' by '},{"Value":'
- Create json string
Now you can use this in your Forms processing Power Automate
Comments