Hi all,
Im have an Azure Devops query that displays all the "In Progress Items" for different teams. The results of the query looks like this: (results is about 300 lines)
Title | State | Area Path
Item1 Active Companyname\Area\Team1
Item2 Active Companyname\Area\Team2
.... and so on..
I made a flow that:
1. Read the query results
2. For each item it extracts the team name from the Area Path field ... example "Team1" or "Team2".
What i need help with, is to count each of the items PER team daily and save each on row on a Sharepoint. So the sharepoint list looks like this:
Team | Date | Count
Team1 Date of run 65
Team2 Date of run 80
....
The reason for this is that i want to calculate the Work In Progress Items per day per team (historic) so i can use it on a PowerBi report. Can anyone help me? Let me know if more information is needed
Thanks
JTS
@creativeopinion Thank you very much. Youve teach me a lot and helped me immensely. Its working perfect now.
@jsanjurr Sorry about that I misread your original post and requirements regarding that.
In the length() expression you need to insert the Body outputs from the Filter Array action. This will return the number of items returned from your Filter Array action.
@creativeopinion the reason i dont have the SP ID is cause i wont be updating i will be creating a new entry each time.
I had contain but i recreated the flow and i missed. I have included it again
What should i put inside the length()? I missing that
In the Select action where you get the Team Name, you are missing the SP ID. Without the ID, you won't be able to update the SP item. Please refer to the screenshot in my original post with the instructions under the Get Team Names heading.
Your Filter Array action operator should be contains, not is equal to.
@creativeopinion for some reason all my replies today were deleted so ima try one more time.
Thanks for the help btw. But i have some questions
1. What should i get inside length()?
2. When i run a test i see that the Body of the Filter Array is empty, im attaching my image so u can take a look if i have something wrong
@jsanjurr That's not an issue. I've updated the original post with the instructions. You need to get the list of Teams and use an apply to each action. See my original post. Hope this helps.
@creativeopinion thanks for the reply, but i forgot to mention. I have around 50+ teams so doing it and maintaining it will be a nightmare
@jsanjurr
You need a Select and Filter Array action to get your count of items.
Add a Select action to your flow and insert the outputs from the Azure Devops query. For my example I'm using a SharePoint list. The concept is the same.
Click the icon, to change from Map to text mode.
Add a Get Items action to return the items from your Team list. Select action to grab the Team name from your list and an Apply to Each action to loop through each team.
For this select action, you will need to use the Map mode. You will need the SP Item ID to update the item.
Add an Apply to Each action. This action will loop through each Team name returned. Insert the outputs from the Select action that contains the array of Team Names and their respective SP ID.
I've added a Compose action as well to store the Team name as you'll need it in the next action.
I used an expression:
item()?['Team Name']
If your Select action key is different, you'll need to replace Team Name with your key text.
Add the Filter Array action into the Apply to Each action. In the From field, insert the outputs from the Select action that you used on the Azure Devops outputs.
In the first value field, insert an expression to access the content.
item()
Change the operator to contains.
In the second value field, insert an expression (or in my case— I've inserted the outputs from above that contain the Team name.
Add a Compose action below the Filter Array action and use the length() function to return the count from the Filter Array action. Insert the Body outputs from the Filter Array action.
Add a Condition action to check the count of the items returned. If the count is greater than zero, add the Update Item or Create Item action into the Yes branch.
This way, the Update Item action will only run if there are items returned from the Filter Array action.
Ensure you are using the content from the Filter Array action in your Update Item action. You will need to use an expression to access this content. This YT Short covers how to do that.
Hope this helps!
stampcoin
61
Michael E. Gernaey
47
Super User 2025 Season 1
rzaneti
31
Super User 2025 Season 1