cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Extract Form Checkbox values to Excel

Hey guys, 

so im trying to fill an .xls with values from my form. 
Challenge is that the results are getting stored in one cell, instead of splitting multiple answers to multiple cells. 

Is there a way to extract the values and map them seperately?

Unbenannt

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Extract Form Checkbox values to Excel

Hi @carstenmkiv,

 

Please try to use functions split, skip, first, etc. to extract values from the return results of a checkbox.

I have made the following test. In the form, I have a multiple answers enabled Choice column.

In the flow, the multiple answers would be displayed likes below:

1.PNG

Then I try to use the following functions to extract values from the results.

Add Compose action, use the following code:

split(body('Get_response_details')?['rf50b84c83d804612a77a6dff04f34645'],',')

Add Compose2, use the following code. The function first will get the first item in the collection, then use replace function to remove the special character “[”:

replace(first(outputs('Compose')),'[','')

Add Compose3, use the following code to return the second item in the collection:

first(skip(outputs('Compose'),1))

Add Compose4, use the following code to get the last item in the collection:

replace(first(skip(outputs('Compose'),2)),']','')

With all the separate items returned, you could enter each item to corresponding column.

2.PNG3.PNG

Hope it could be your reference. 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
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

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Extract Form Checkbox values to Excel

Hi @carstenmkiv,

 

Please try to use functions split, skip, first, etc. to extract values from the return results of a checkbox.

I have made the following test. In the form, I have a multiple answers enabled Choice column.

In the flow, the multiple answers would be displayed likes below:

1.PNG

Then I try to use the following functions to extract values from the results.

Add Compose action, use the following code:

split(body('Get_response_details')?['rf50b84c83d804612a77a6dff04f34645'],',')

Add Compose2, use the following code. The function first will get the first item in the collection, then use replace function to remove the special character “[”:

replace(first(outputs('Compose')),'[','')

Add Compose3, use the following code to return the second item in the collection:

first(skip(outputs('Compose'),1))

Add Compose4, use the following code to get the last item in the collection:

replace(first(skip(outputs('Compose'),2)),']','')

With all the separate items returned, you could enter each item to corresponding column.

2.PNG3.PNG

Hope it could be your reference. 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
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

Highlighted
Regular Visitor

Re: Extract Form Checkbox values to Excel

Hi Mabel, @v-yamao-msft

 

first of all: Huge thanks! 
I got the fields seperated and they get transferred into my excel.

Last problem i have: 
Now every checkbox field is transferred to my excel. I just want the boxes that are ticked to fill - every "empty" checkbox should be ignored. 

beta2

Highlighted
Administrator
Administrator

Re: Extract Form Checkbox values to Excel

Hey, @carstenmkiv!

Thank you for posting to the Flow Community Forum! It appears you have found a solution to your issue! If you feel as though your issue has been solved and you are satisfied with one of the previous replies, please click "Accept as Solution" on the reply that contains the solution so that this thread will be marked for other users to easily identify!

Thank you for being an active member of the Flow Community!

-Gabriel
Microsoft Flow Community Manager

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!
Highlighted
Regular Visitor

Re: Extract Form Checkbox values to Excel

I can follow the instruction and this does split the values (in my case 5 options). The trouble is the outputs don't map correctly if for instance option 1, 3 and 5 is selected (because that is still output 1, output 2 and output 3) 

 

The Best solution would be to return a value "no" for an unselected checklist item and a "yes" (or the splitted value) for a selected checkbox. This way we could create outputs for all the options.

 

Following my example this would look result in this: 

 

Compose output 1 = yes

Compose output 2 = no

Compose output 3 = yes

Compose output 4 = no

Compose output 5 = yes

 

And I can map the 5 output dynamic values to the correct Excel columns in the "Add Excel Row" action

 

 

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Users online (6,691)