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).
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 !
Solved! Go to Solution.
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:
Best Regards,
Levi
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.
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.
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:
Best Regards,
Levi
Hi Levi,
Thank you so much for your step by step guidance. Truly appreciate your help.
Actually for me the select operation needs value to be put in . Else it gives empty and then throws error at the end.
User | Count |
---|---|
88 | |
40 | |
23 | |
20 | |
16 |
User | Count |
---|---|
128 | |
49 | |
47 | |
35 | |
25 |