Forum Discussion
Formatting Table Data in Microsoft Forms
Hi Nicky Nickyl sorry for the delay in getting back to you. Firstly I assume you are using a table similar to the questions outlined in red in the screenshot below:
We always store our forms responses to a SharePoint list, and this can be done as part of the same flow that creates the table in the email and sends out the email.
The trigger is the Forms When a new response is submitted, immediately followed by the first action Get response details. Next we create the item in the SharePoint list with one column for each question in the form including one column for each of the table questions (Experience and Workmanship in this example):
In the following step we need to use the Get items and set the filter query to bring back just the item we created so that we can then create an HTML table from it:
An expression is added inside a Compose control to format the table. Then we send the email using the output of the compose as the body of the email.
Much of this won't be familiar to you I suspect, so don't hesitate to come back with any further questions.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Hi, RobElliott
The form itself does not use a table. It would be more of a case of someone pasting in a table into question 2 in your example.
It might look something like this:
I'm guessing that nothing can be done to change the format of this response so that it outputs neatly in an email form. We have an outside company that send us queries. When those queries are sent (currently using a Google Form), they appear in our inbox as an email. Sometimes, this customer needs to send us information in a table format - they don't use the Google Form to send tables because of the messy email output but this means we cannot capture table queries with all of the other non-table queries that arrive.
Regards, Nicky
- Damien_RosarioAug 04, 2020Silver Contributor
Hi there
As Nickyl has already seen, there's presently no way to format tables in Microsoft Forms responses and so it would end up being unformatted plain text.
Unfortunately, I do not believe there is an easy workaround to the issue short of manual manipulation to fix the data and then a workflow to send the email, which would defeat the purpose of automation.
Rob's detailed example is for taking a forms response and formatting it into a HTML table for use when sending emails which is handy when you need to have a more organised layout in your emails to read the data.
Cheers
Damien
- mpawelkoMay 01, 2024Copper Contributor
Damien_Rosario I use HTML tables to separate answers from questions, which works well. However, I encounter an issue when the text is lengthy. It displays as a continuous block of text in an email, making it difficult to read. How can I automatically insert new lines after a dot '.' or a dot and a space '. ' or any other separator to improve readability?
- Damien_RosarioMay 29, 2024Silver Contributor
Hi mpawelko
You could try and word-wrap the output.
Give this resource a go and see if it resolves your issue?
How to Wrap text in Html - javatpoint
Best wishes
Damien