Dear community,
I have created a flow which:
The results are in the following format:
/_api/web/lists/getbytitle('<List Title>')/ItemCount
.body('Send_an_HTTP_request_to_SharePoint')?['d/ItemCount']
HI @AJ007 - I don't think I would bother with the threaded method for your use case. Why not just use one apply to each with the concurrency set to the maximum - it would be a much more simplistic flow.
Hi Paulie,
Brilliant thanks for this and good timing. I do need to do a mass delete of records in the Teams Table. Unfortunately our IT have locked access to the HTTP action.
So I was going to leverage an earlier solution of your which uses Threads. I was going to run the Threads concurrently and the first thread would process rows 1 - 5000, the second thread 5001 - 1000 as so one. Within each thread there would be the 'apply to each' to 'delete row', which again would run concurrently maxing out a 50.
My issue is that I do not know how to select rows 1 - 5000, 5001 - 1000 etc of a Teams Table. With a SharePoint list I can use the ID column. In the Teams Table I have created an AutoNumber column but this is saved as a text. I'm guessing a solution might involve Fetch XML Query in the List Rows action?
Appreciate any suggestion?
@Paulie78 - SUPER THANKS! It works great, and saves a lot of time.
Hi @Anonymous,
I've done a video for you that demonstrates a high performance way of counting the distinct items in an array, without having to use a filter action or any apply to each loops. Check it out:
How to count the number of Distinct Items in an Array in Power Automate
Hope this helps.
Blog: tachytelic.net
YouTube: https://www.youtube.com/c/PaulieM/videos
If I answered your question, please accept it as a solution 😘
There is no simple way to do this, but it can be done without using an Apply to Each.
1) Do a Filter Array action for each value you want to count.
2) Use Length() on the resulting array. That will give you a count for that value.
repeat process for each distinct value.
WarrenBelz
146,776
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,093
Most Valuable Professional