I had followed the solution here and found it to get me close to what I need, however, I'm wondering how to take my Sharepoint list of items and update the list to show how many times the item might be duplicated.
For instance, I have a list of five things:
Ball
Dog
Cat
Dog
Armadillo
I'd like to be able to have another row that will show this
Ball | 1
Dog | 2
Cat | 1
Dog | 2
Armadillo | 1
By following the solution referenced above, I can email the table, but I would just like to have the list updated.
Perfect! Works exactly as described. Thank you very much!
I've created a solution that will hopefully get what you're looking for. Note that this solution uses a reoccurring trigger that would run as often as you wanted (similar to the example you shared). This means when you add, delete, or modify an item the count wont update until the flow runs again so would be a delay. This also updates every item regardless of whether it needs to be updated or not.
How many items do you have in your list?
For this example, I'm using the following list. Title contains the names, and Count (Number data type) will contain the number of times the Title appears in the list.
See full flow below. I'll go into each of the actions.
Reoccurrence is set to run on a schedule (up to you how often).
Get items retrieves all the items from the list.
Select creates a simple array of all the Titles in the list. Note that the Map is using Text mode (see arrow on screenshot).
Apply to each uses the output from the Select but uses the union expression passing in the Select output twice so it removes any duplicates. So, the Apply to each will iterate over each of the unique Titles. The expression used is:
union(body('Select'), body('Select'))
Filter array will use the current Title and filter the items where the Title is equal to the current Title. The first time through the loop, the Title would be Ball, so the Filter array would filter the items in our list where the Title is equal to Ball. The second time through the loop, the Title would be Dog, so the Filter array would filter items in our list where the Title is equal to Dog, etc.
Apply to each Update uses the output from the Filter array so it iterates through each of the items returned.
Update item will update each of the items with the current number of instances for that Title. The expressions used are below:
//Id
items('Apply_to_each_Update')?['ID']
//Title
items('Apply_to_each')
//Count
length(body('Filter_array'))
After the flow runs, we would see the following output.
----------------------------------------------------------------------
If I've answered your question, please mark the post as Solved.
If you like my response, please consider giving it a Thumbs Up.
Thanks. I am actually looking for the counts added to each row. Based on the count number, I would have a flow that would send a notice to the "Dog" saying there are too many (if that makes sense)
I had checked another link and this almost works except it doesn't at all (meaning it just doesn't result in accurate information)...
Would it work for you to just Group by that column in your list which would automatically show the count of each one.
Or do you need the counts added to each row?
----------------------------------------------------------------------
If I've answered your question, please mark the post as Solved.
If you like my response, please consider giving it a Thumbs Up.
David_MA
292
Super User 2025 Season 1
Michael E. Gernaey
259
Super User 2025 Season 1
stampcoin
214