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:
Item2 (contains both item 1 and 2)
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
thank you so much i think that has sorted it for me
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:
{
"images":@{length(outputs('Get_attachments')?['body'])},
"Title":@{items('Apply_to_each')?['Title']},
"Subject":@{items('Apply_to_each')?['Subject']}
}
My SharePoint List:
Best Regards,
Sunshine Gu
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:
item()
Output:
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
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?