cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
carstenmkiv
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
v-yamao-msft
Community Support
Community Support

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
v-yamao-msft
Community Support
Community Support

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

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

GabrielStJohn
Administrator
Administrator

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
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager



Thinkbusiness
Regular Visitor

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (56,193)