We have a Forms input:
https://i.imgur.com/GiyO3ZN.png
Using Flow to move the Forms data to Sharepoint Multi Choice field in List
https://i.imgur.com/pmMKJuX.png
Same issue but hoping there are better ways of doing it now:
Hi @robcarrs
The issue is that you're passing to SharePoint a "string" that comes from the Form that contains a JSON with an array. Quite tricky, I know, but let's break it down into an example:
The "Create Item" expects something like this:
[
{
"Value": "Option 1"
},
{
"Value": "Option 3"
}
]
and you're providing
[
{
"Value":"[\"Option 1\",\"Option 3\"]"
}
]
You need to convert it to an array of values so that SharePoint can match the items and know what to do with them.
You need to:
Here's the full flow:
To remove the characters, use a compose with the following formula:
replace(replace(replace(body('Get_response_details')?['re96ff20a4f3d44ec9485b8250dbbc748'],']',''),'[',''),'"','')
Then create an array with the elements:
split(outputs('Removes_the_Characters'),',')
To create the array create an empty array variable. Then do a for each and append to the array with the following formula:
json(concat('{"Value":"',items('Apply_To_Each'),'"}'))
Finally, insert the value in the "Create Item."
You'll get something like this:
I've added a template so that you can import so that you don't need to create everything manually.
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers
Manuel
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
12 | |
11 | |
9 | |
9 | |
6 |
User | Count |
---|---|
26 | |
20 | |
12 | |
8 | |
7 |