cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbrunner
Level: Powered On

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
Level 10

Re: Imported data from MS Form shows brackets and quotes in Excel

Hi @jbrunner ,

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

6 REPLIES 6
Super User
Super User

Re: Imported data from MS Form shows brackets and quotes in Excel

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
Level 10

Re: Imported data from MS Form shows brackets and quotes in Excel

Hi @jbrunner ,

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

jbrunner
Level: Powered On

Re: Imported data from MS Form shows brackets and quotes in Excel

@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.

jbrunner
Level: Powered On

Re: Imported data from MS Form shows brackets and quotes in Excel

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

 

Capture.PNGCapture1.PNG

v-zhos-msft
Level 10

Re: Imported data from MS Form shows brackets and quotes in Excel

Hi @jbrunner ,

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.

jbrunner
Level: Powered On

Re: Imported data from MS Form shows brackets and quotes in Excel

@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!

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 187 members 4,617 guests
Please welcome our newest community members: