Hello All,
I have a created a microsoft forms which triggers a flow to save the data on SharePoint excel and then sends the same details via email.
Flow gets triggered when new entry is made in forms. I am reading forms data using the following formula
@{first(triggerBody()?['value'])?['resourceData']['responseId']}
The forms and flow works fine but it updates data incorrectly where my form is displaying Multiple checkbox option.
For multiple checkbox section, flow is reading the data from Forms as
"rc07d5055e2eb4cc8936262f0e3ba9aeb": "[\"Option 1\",\"Option 2\",\"Option 5\"]"
and then putting the values in the excel sheet as ["Option 1","Option 2","Option 5"]. How can I remove the [" when flow writes data to excel.
Solved! Go to Solution.
Hi @Anup_Behera ,
You could try removing the symbol using Expression below.
Expression reference:
replace(replace(replace(body('Get_response_details')?['rce25a6a0207f436993c3f09cb9c41c02'],'","',','), '["',''), '"]','')
body('Get_response_details')?['rce25a6a0207f436993c3f09cb9c41c02'] , This section is configured according to the Dynamic content of your own form.
For example, I created a form with a multiple choice, the name of Question is checkbox:
Image reference:
Flow run history:
Hope it helps.
Best Regards,
Hi @Anup_Behera ,
You could try removing the symbol using Expression below.
Expression reference:
replace(replace(replace(body('Get_response_details')?['rce25a6a0207f436993c3f09cb9c41c02'],'","',','), '["',''), '"]','')
body('Get_response_details')?['rce25a6a0207f436993c3f09cb9c41c02'] , This section is configured according to the Dynamic content of your own form.
For example, I created a form with a multiple choice, the name of Question is checkbox:
Image reference:
Flow run history:
Hope it helps.
Best Regards,
Hi @v-bacao-msft ,
I have the same issue where my form has a multiple answers question and I'm using Flow to send the answers to a Sharepoint list and to Excel.
The form choices in my question are:
1-12
11-24
27-48
The flow sends the response to SP/Excel like this:
["0-12","11-24","27-48"]
I tried your solution and the flow runs successfully but the output is still:
["0-12","11-24","27-48"] in SP/Excel
When looking at the flow run history, it's referenced like this:
Any ideas where I might be going wrong?
Thanks,
Lee
Hi @v-bacao-msft,
Thanks for this. I can get your solution working, but also need to filter out the following text: "\n", which is being appended to my MS Form dropdown values. So my values are:
["Value_one\n"]
["Value_two\n"]
["Value_three\n"]
Whereas, I need them to be:
Value_one
Value_two
Value_three
This syntax removes the [""]:
replace(replace(replace(body('Get_response_details')?['rce25a6a0207f436993c3f09cb9c41c02'],'","',','), '["',''), '"]','')
But I'm struggling with removing the \n. Any help would be appreciated (I'm not a programmer).
Thanks,
Jason.