Showing results for 
Search instead for 
Did you mean: 
Continued Contributor
Continued Contributor

Splitting an array to string - HTML table

In my flow I initialise a variable, varAttachments, which is an array. The array is made up of URLs of the file attachments from a SharePoint list item (AbsoluteURI).

I want to get all the URLs from the array into their own strings and then reference them in my HTML table.


So the array is in the format ["AttachmentURL1", "AttachmentURL2"] and I want "AttachmentURL1" "AttachmentURL2" each as strings. There could be any number of URLs in the array.


Once I have those I need to add them to a HTML table as below except that each URL string needs to be wrapped in an <img> tag. What would be the best way for me to do this please?




Continued Contributor
Continued Contributor

Just to give some more information on this. This is how I got my array:



I get my SharePoint items (odata filtered) and initialise the varAttachments variable. I get the attachments for each of my SharePoint items. I append Absolute URI to varAttachments within an apply to each (body for get attachments). 


I've also tried this with varAttachments as a string and it creates one string of the URLs without a separator.

Really what I need to do is separate each of my varAttachments into their own values. Am I missing something really obvious?


Solution Sage
Solution Sage

Continued Contributor
Continued Contributor

Hi @mahoneypat 

Thanks for the idea. The concat is the right idea of what I need to do, but I'm working with multiple images, so it doesn't help with that.


I've now got the images to display in my table (in the body of the email but not the PDF) by setting a string variable, varAttachments, to be a concat of <img src wrapped around items('Apply_to_each')?['AbsoluteUri']. This variable is then just added to the HTML table. However the problem is that this brings all the images into each row, where I'd like it to display only the images applicable to each item. I need for the flow to recognise which attachments apply to which items. Is this at all possible?

Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,139)