cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alomanto88
New Member

Getting data from Checkboxes in Microsoft Forms into Flows without brackets and quotes

I am a Flow noobie and I am running into two issues:

 

1. Is there a way to parse the data that Forms kicks out, specifically removing the [" "] around each item for a checkbox question? I would like to be able to handle the data in future steps without any formatting. I have tried playing around with the various Data Operations but so far cannot figure out how to parse that data. Example:

 

Cell Phone: ["Android"]

 

2. Similar to the above question, I am taking the output of that question and checking it against an excel spreadsheet to see who the data owner is. I can't figure out how to take each answer from that question and make it its own data point. For example, if the form was filled out and 5 checkboxes were checked on this question. I want to be able to have flow check each of the 5 data points against my excel spreadsheet and start an approval on the appropriate person that is assigned there. Example:

 

  • Exported data from the form:

 

Required Systems: ["Adobe Acrobat Professional","Visio"]

 

  • Spreadsheet that I am checking against:

2018-08-15 14_32_57-DataApprovers.xlsx.png

 

Any help is greatly appreciated!

7 REPLIES 7
v-yamao-msft
Community Support
Community Support

Hi @alomanto88,

 

About #1, how is the checkbox question field created in Microsoft Forms? I assume that it should be of Choice type field, and the value for selections are of format [“Android”], am I right?

 

Then I made a simple test on my side likes below. In the Compose2, use the following code to remove the [“”] around the item.

substring(body('Get_response_details')?['r5c3f7b0ad3574259895b40096e9403be'],2,sub(lastindexOf(body('Get_response_details')?['r5c3f7b0ad3574259895b40096e9403be'],'"]'),2))

 

Please check the following screenshot for a reference:

1.PNG

 

About #2, do you want to get the appropriate person’s email address depends on the response of the forms?

 

Please try to use the Excel action Get rows, then use a Condition to check if they have the common value, if yes, send an email to the person.

 

Please feel free post back if you need more help.

 

 

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.

Hello,

 

Regarding to #1, I was successfully remove [""] by using the following code but it doesn't work if multiple checkboxed are checked from the form. 

 

For example:

 

["Android"],["Apple"] then uses the code to remove [""] = Android","Apple

 

Is there another code that I will need to remove those quotes? I am trying to implementing it with send email with options so the quotes is throwing it off.

 

Any chance you ever found a solution to remove the quotes? Dealing with the same issue. Unable to email out due to slashes. 

@Solarioc 

Try using the replace expression.

replace(Your Value,'"','')

After the first comma, I have a double quote wrapped in two single quotes.

After the second comma, I have two single quotes with nothing in between.

 

I haven't tested this but it should work for you.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Would this expression go within the send mail action?

@Solarioc 

It could go in the email action - it's up to you.  You can also use a variable or compose action and reference either of those in the email instead - your choice.

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

The following is convoluted but works for me...

 

replace(substring(body('Get_response_details')?['xxxFormResponseIDxxx'],2,sub(lastindexOf(body('Get_response_details')?['xxxFormResponseIDxxx'],'"]'),2)),'"','')

 

I would consider this solved.

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

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

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (60,658)