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

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,508)