HI Guys
I have one case regarding the count the Sharepoint items via flow
Idea: there 3 company names in sharepoint list, then I need to count the status: on going case number per company and send summary emails and also with attachment from sharepoint list for the open case details
take below pictures as example
the email body should summary like below
ongoing cases:
IJV : 1
STJV:1
Sharefunction: 1
any thoughts ?
The response below is assuming both your column types are Single Line of Text, however it would work similarly if you had choice column - intention is to show you a concept.
0 - Initialize an empty array variable
1 - Get Items with ODATA query as status equals On going
2 - Now use Select Filter Array and just get Title column as an Array
3 - Use expression union(Title,Title) to get distinct values of company names
4 - Now use Apply to Each on the company name
5 - Filter Array from Step 1 where Title equals current Item. Count length and store in an array variable from Step 0.
Step # 0,1,2,3 are in screenshot below
Following above steps, I used following test SP List (Screenshot #2) and got output as below (screenshot #3)
SharePoint List
Output
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,962
Most Valuable Professional