cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mitalipatel
Frequent Visitor

Flow to send count of items with particular status to assigned to people on my Sharepoint List

Hi, 

I'm trying to build a flow wherein I fetch data from a  SharePoint List. In the SharePoint List, I have two columns as - Status and Assigned to. 

Assigned to column is a Person type column in SharePoint List whereas Status is a choice column. 

 

I want to get a count of Status = "No Result " and group it by Assigned to person. 

So, e.g. If there are total 10 status with No Result records and 5 are assigned to Person X and other 5 to Person Y, 

I want to build a flow such that it takes these count (5 records ) and sends to Person X and other 5 to Person Y. 

 

I already figured how to get the count of items' in the list (attached for reference). 

 

mitalipatel_1-1663654991747.png

mitalipatel_2-1663655024757.png

 

I just need help on how to apply condition so that it sends respective counts to assigned people. 

 

Any help /direction is greatly appreciated. Thanks !

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-liwei-msft
Community Support
Community Support

Hi @mitalipatel 

 

1. You can use Select to get the email address of the Assigned To column. 

2. Use the Union function to deduplicate the email address. 

3. Use Apply to each to traverse the result of the Union function. 

4. Using the filter array, enter the formula in advanced mode (filter Status equals No Result and Assigned To column email address equals current item): 

@and(equals(item()?['Status/Value'], 'No Result'),equals(item()?['AssignedTo/Email'], items('Apply_to_each')))

5. Send an email, and the length function returns the eligible items.

 

I have made a test for your reference:

vliweimsft_0-1663660148947.jpeg

vliweimsft_1-1663660159274.png

vliweimsft_2-1663660171565.png

vliweimsft_3-1663660191807.png

vliweimsft_4-1663660211554.png

 

Best Regards,

Levi

 

 

View solution in original post

7 REPLIES 7
Sundeep_Malik
Community Champion
Community Champion

Hey @mitalipatel 

You can use a filter action for your case. 

 

Sundeep_Malik_0-1663655857590.png

 

Hopefully this helps. 

Hi, 

Thanks for your help. But actually that's just an example. I have a list of people which can 10-15 or more to whom the records may be assigned. And then I need both the count of No result based on whom it is assigned to. 

Sundeep_Malik
Community Champion
Community Champion

Hey @mitalipatel 

actually this will be in a loop, so you will have to use filter only once. No need to use it twice. So, this will work for 15-20 people as well. 

v-liwei-msft
Community Support
Community Support

Hi @mitalipatel 

 

1. You can use Select to get the email address of the Assigned To column. 

2. Use the Union function to deduplicate the email address. 

3. Use Apply to each to traverse the result of the Union function. 

4. Using the filter array, enter the formula in advanced mode (filter Status equals No Result and Assigned To column email address equals current item): 

@and(equals(item()?['Status/Value'], 'No Result'),equals(item()?['AssignedTo/Email'], items('Apply_to_each')))

5. Send an email, and the length function returns the eligible items.

 

I have made a test for your reference:

vliweimsft_0-1663660148947.jpeg

vliweimsft_1-1663660159274.png

vliweimsft_2-1663660171565.png

vliweimsft_3-1663660191807.png

vliweimsft_4-1663660211554.png

 

Best Regards,

Levi

 

 

Hi Levi, 

Thank you so much for your step by step guidance. Truly appreciate your help. 

v-liwei-msft
Community Support
Community Support

Hi @mitalipatel 

 

In select, you need to get the email of the person column.

vliweimsft_0-1663663537217.png

 

Best Regards,

Levi

 

Actually for me the select operation needs value to be put in . Else it gives empty and then throws error at the end. 

mitalipatel_1-1663761101548.png

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,974)