cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jobb89
Frequent Visitor

How to get Form responses in an easily readable format in the email for the approver to review when the Form responses are a checklist

Hello,

 

I have been trying to work this out for a while with no success, and can't seem to find anyone with a problem similar enough to mine that I can use the advice given there. I have a flow set up which is working nicely, but as the approver cannot see the form responses, I would like to include them in the approval email.

 

In the section called "Start and wait for an approval", in the details section I have included each question response added as dynamic content. Most times I have seen this approach on this site, the form responses are a string that the user has inputted, so it displays the responses nicely. e.g.

 

First Name: John
Surname: Doe

Approval Status: Approved

 

This form I have is basically a checklist however. Once the user submits the form, the information is transcribed into an excel workbook automatically (which is hosted on SharePoint), with the responses from each question stored in individual cells as an array. e.g.

 

Form:

question 1:

check1
check2

check3

question 2:

check4

check5

check6

 

and in the excel spreadsheet it is :

question 1

question 2

["check1","check2","check3"]

["check4","check5","check6"]

 

When I include the questions as dynamic content in the email body it displays with bad formatting like so:

question 1: ["check1","check2","check3"]

question 2: ["check4","check5","check6"]

 

Rather than having the selected checkboxes listed as an array, I would like to get it in some tabulated format that is more readable, even if it is just:

 

question 1:

check1

check2

check3

 

question 2:

check4

check5

check6

 

or some other more readable table format which I can include in the email body or as a pdf/table attachment.

 

I have tried using parse JSON for a question to get the array values on single lines, and in the testing it gives the data nicely on separate lines like in my text example above (but only in the testing output box). When I added the parse JSON output as dynamic content in the email body, it puts the rest of the section in an "Apply to each" box and it fails and won't save.

 

If I try to create csv table directly from the question (as the data is already in an array format I thought?), I get this error: "BadRequest. The 'from' property value in the 'table' action inputs is of type 'String'. The value must be of type 'Array'." even though the data is listed as ["check1", "check2"] etc. 

 

Another issue I have is if there are 5 checkboxes in a question for example, if a user only selected 3 checkboxes, only the selected checkbox values are included in the array. So any that aren't selected aren't recorded as a null value, it just has 3 values in the array rather than ["null", "check2", "check3", "null", "check5"]. Is there any way to include the information about checkboxes that were not selected in the output? Since the checkbox values are always going to be the same for each question, I thought if you only have 5 strings that are possible in the array, then a lookup function could check to see if there was a matching string in the array, and if it is the same it will return yes like so:

 

question 1:

check1 - No

check2 - Yes

check3 - Yes

check4 - No

check5 - Yes

 

Is that something achievable?

 

Any help with these issues would be greatly appreciated thank you!

 

James

 

2 REPLIES 2
JohnAageAnderse
Memorable Member
Memorable Member

Hello @jobb89 

Did you find a solution for your need or is the need still relevant?

If still relevant, could you show us what you have done and where you got stuck?

Kind regards, John

Hi @JohnAageAnderse, thanks for checking up on this post. Sorry I neglected to reply to it, I thought I submitted a response but it must not have gone through properly.

 

I have figured out how to include the results from the Form in the approval email itself, and have formatted it in a way that is easier to read than previously. I still think it could be improved upon though, but haven't worked out how to make it that little bit nicer.

 

These are mostly multiple selection checkboxes, and any selected checkboxes are included in the email summary. I will try and show how it looks:

 

Question 1:

☐ Response 1

☒ Response 2

☒ Response 3

☒ Response 4

☒ Response 5

☐ Response 6

☒ Response 7

 

Question 2:

☐ Response 1

☒ Response 2

☒ Response 3

☒ Response 4

☐ Response 5

☒ Response 6

 

And the approval email summary of form responses looks like:

 

The form responses are included below:

 

Question 1:

Response 2; Response 3; Response 4; Response 5; Response 7

 

Question 2:

Response 2; Response 3; Response 4; Response 6

 

The text associated with each checkbox is pretty lengthy rather than one word responses, so it can be hard to see a semi-colon amongst all the text indicating the separate selected answers. For that reason I was wanting to display it in maybe a bullet point list like so:

 

The form responses are included below:

 

Question 1:

 

  • Response 2
  • Response 3
  • Response 4
  • Response 5
  • Response 7

 

Question 2:

 

  • Response 2
  • Response 3
  • Response 4
  • Response 6

From my understanding the checkbox data is stored as an array, and in order to display it like I want I need to extract the separate values from the array and then display the individual data on separate lines using a table (?) or preferably directly on new lines simply with bullet points. I have not worked out a good way to do that yet though! Is this the correct approach, and do you know of a good way to implement this? Thanks again John!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors
Users online (1,404)