cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Imported data from MS Form shows brackets and quotes in Excel

I currently have  a flow that is properly importing data from an MS Form to an Excel sheet, but the problem is that for questions on my form with multiple responses, the data is imported to Excel with brackets and quotes around each response selected. I'm trying to determine if there is a way to eliminate the brackets and quotes from data on the sheet.

 

For example:

 

-MS Form Question-

Who was in attendance?

o Jim H.

o Pam B.

o Michael S.

o Dwight S.

 

-User selects the following: 

Who was in attendance?

√ Jim H.

o Pam B.

√ Michael S.

√ Dwight S.

 

- Excel cell shows-

["Jim H.", "Michael S.", "Dwight S."]

 

 

I need the Excel cell to show:

Jim H., Michael S., Dwight S.

 

Or some other format of the data that can be recognized in a formula.

 

thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
v-zhos-msft
Solution Sage
Solution Sage

Hi @Anonymous ,

You can use the replace function here to replace the brackets and quotes.

First I setted a choice column (people) in my form.

Capture8.PNG

I have made a flow for your scenario, please check it for a reference.

The expression in Compose is: replace(body('Get_response_details')?['r6944a0257ae344fc8c35bd2a7cf1363e'],'[','')

The expression in Compose 2 is: replace(outputs('Compose'),']','')

The expression in Compose 3 is: replace(outputs('Compose_2'),'"','')

Capture7.PNG

 

Capture9.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Brad_Groux
Super User II
Super User II

The data being returned is in JSON format. For a full rundown on how to properly parse JSON in flow, see the A Thesis on the Parse JSON Action in Microsoft Flow blog post, by John Liu. You may also want to see the Track Microsoft Forms responses in an Excel Online (Business) spreadsheet template. The Perform advanced JSON transformations with Liquid templates in Azure Logic Apps documentation may be of some help too.

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

v-zhos-msft
Solution Sage
Solution Sage

Hi @Anonymous ,

You can use the replace function here to replace the brackets and quotes.

First I setted a choice column (people) in my form.

Capture8.PNG

I have made a flow for your scenario, please check it for a reference.

The expression in Compose is: replace(body('Get_response_details')?['r6944a0257ae344fc8c35bd2a7cf1363e'],'[','')

The expression in Compose 2 is: replace(outputs('Compose'),']','')

The expression in Compose 3 is: replace(outputs('Compose_2'),'"','')

Capture7.PNG

 

Capture9.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

@v-zhos-msft 

Thanks for your suggestion.

I tried to do what you suggested, but for some reason I received an error when trying to utilize these two replacement expressions.

The expression in Compose 2 is: replace(outputs('Compose'),']','')

The expression in Compose 3 is: replace(outputs('Compose_2'),'"','')

 

I can enter both of them if I close the parathesis without the final comma and quotation. 

 

I don't know if this is the data is going into a table with mutiple columns of information or not.

Anonymous
Not applicable

This is how my flow looks, but it doesn't work when I fill out the MS Form.

 

Capture.PNGCapture1.PNG

Hi @Anonymous ,

Could you please share a screenshot of the error?

what's the expression in Compose?

I need more details to analysis for you.

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@v-zhos-msft 

Here is the expression in COMPOSE

replace(body('Get_response_details')?['r597875f2b7ae4d4aa1d5bca144c36f5d'])
 
I did it this way because even in COMPOSE,  I receieved this error when trying to utilize the expression formatted suggested.
Annotation 2019-06-08 000516.png
 
This is the same error that I get for Compose 2 and Compose 3 when I try entering those expressions in the format suggested.
 
 
Thanks again for all your help!
Vincebk
Frequent Visitor

I'm getting an error when I run my flow also. Please help!error1.PNGerror2.PNGerror3.PNG

Can you put multiple replace functions in one Compose Array to affect multiple response details?

 

Here is my code:

replace(body('Get_response_details')?['ra674204a9a224fcabbaa5822e0a91eb1']replace(body('Get_response_details')?['r21df150effca4ca6812c950c0006a411']replace(body('Get_response_details')?['r426a43b4ff8d435f83e71b22660a8104']replace(body('Get_response_details')?['r6f8fdc613a8b4f3eb85c7224d9cf1202'],'[','')

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (25,760)