cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

SharePoint List Item - Multiple column fields into one HTML column output

Hello,

 

I have a single sharepoint list item with columns:

Action 1

Action 2

Action 3

Action 1 Assigned To

Action 2 Assigned To

Action 3 Assigned To

Action 1 Due Date

Action 2 Due Date

Action 3 Due Date

 

I would like to neatly place these into an HTML Table with headers to send via email:

Actions

Assigned To

Due Date

 

Any ideas on the general direction I should take to append multiple fields into a single table column? Is this even possible? I've been playing around with arrays and strings etc to no avail. 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: SharePoint List Item - Multiple column fields into one HTML column output

I figured out a simplier solution: Just html coded directly into the email body and added in some cell padding to make it look not as squished.

Capture.PNG

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: SharePoint List Item - Multiple column fields into one HTML column output

Hi @Anonymous 

 

Do you mean that you have three columns: Action, Assigned to and Due date that have those values as mentioned in the post? 

 

In that case, you can directly create the HTML table from the outputs of the Get Items action. I created a sample array for a quick reference:tesa.PNG

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Community Support Team
Community Support Team

Re: SharePoint List Item - Multiple column fields into one HTML column output

Hi @Anonymous ,

 

If there is only a single item in the list, you could get the data in the item directly through the item ID.

Then initialize the array variable, configure Value according to JSON format, and finally configure HTML table.

It should be noted that when the variable type is array, you may not be able to use Dynamic content. You could set the variable to the string type first, and then switch the variable type to array after Value is configured.

 

Image reference:

6.PNG7.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: SharePoint List Item - Multiple column fields into one HTML column output

Thanks for helping @v-bacao-msft ,

 

you are correct, I can't use Dynamic content with the initialized array variable. 

I could use some help with the work around on this!

My failed attempt:

I created an initialized string variable first, and then an array,Capture.PNG

and then used a Compose split() function to break it down further into 3 rows (';' is the delimiter), and then used an Apply To Each loop to split even further into 3 columns (',' is the dilimeter).

I can't append an array to the array, so I had to add an extra apply to each loop to concat('-  ','item()) together to create a string.

I appended this to the array, which works in the flow.

Capture.PNG

However when I "Creat HTML Table" it says "BadRequest. The property 'columns' must be specified unless the 'from' property value is an array of objects."Capture.PNGAny help would be appreciated

Anonymous
Not applicable

Re: SharePoint List Item - Multiple column fields into one HTML column output

I figured out a simplier solution: Just html coded directly into the email body and added in some cell padding to make it look not as squished.

Capture.PNG

View solution in original post

Helpful resources

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,368)