web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create a total of atta...
Power Automate
Answered

Create a total of attachments in sharepoint items and then display in HTML Table

(0) ShareShare
ReportReport
Posted on by 27

I have a flow that goes through the filtered items and inside the apply to each i have a compose that totals the attachments for each item.

 

Compose: length(outputs('Get_attachments')?['body']) - the outputs of this compose are correct but i then need to create an HTML table that will show the total attachments for each item on a separate row along with some other items from that SharePoint list.

Whatever i try at the min the totals are coming back and one entry on the HTML table or like the below:

 

Item 1:

andrewp3283_0-1712233253513.png

 

Item2 (contains both item 1 and 2)

andrewp3283_1-1712233292189.png

And so on with the next item etc, what should be happening is it should read:

 

Item1: 3

Item2: 0

Item3: 3

Item4: 6

 

Thanks in advanced

Categories:
I have the same question (0)
  • Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @andrewp3283 

     

    Could you please share the screenshot(s) of the entire flow in edit mode?

     

     

  • andrewp3283 Profile Picture
    27 on at

    thanks for the quick reply i will post the flow, but as a test my HTML Table inputs look correct its the outputs that are not?

    andrewp3283_0-1712234994188.png

     

     

  • Manish Solanki Profile Picture
    15,169 Moderator on at

    Here is the sample:

     

    In "Create HTML table", set 'Columns' parameter to 'Custom' and add an expression in the header value. Expression needs to be added in the expression box as shown below:

    ManishSolanki_0-1712235616027.png

    item()

     

    Output:

    ManishSolanki_2-1712235822692.png

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • Verified answer
    v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @andrewp3283 ,

    @ManishSolanki approach is correct, I appreciate it very much.

    But if you want to add other item fields in addition to the images field, please check my test flow.

    The Result:

    vyetonggumsft_0-1712235681177.pngvyetonggumsft_1-1712235711684.png

    vyetonggumsft_2-1712235840954.png

     

    {
    "images":@{length(outputs('Get_attachments')?['body'])},
    "Title":@{items('Apply_to_each')?['Title']},
    "Subject":@{items('Apply_to_each')?['Subject']}
    }

     

    My SharePoint List:
     

    vyetonggumsft_3-1712235977417.png

    Best Regards,

    Sunshine Gu

  • andrewp3283 Profile Picture
    27 on at

    thank you so much i think that has sorted it for me

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 274 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 175

#3
Haque Profile Picture

Haque 166

Last 30 days Overall leaderboard