function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
HARSHIL U PARIKHHARSHIL U PARIKH 

How to make rollup summary that counts only identical email addresses?

I have Master object A and detail object B.
On object A I am storing Projects.
On B I am storing volunteers.

I need to count number of people work on each project. So, how would I count B records with identical email addresses?

(e.g., let A be a Office Clean Up Project and number of people helped are 5 on different timelines but 2 of them had identical email address so my rollup should return 4 instead of 5)
Thanks for your help!
Georgy PeshkovGeorgy Peshkov
I suppose, it's possible to do using process builder+visual flow:

1) Set process builder to trigger a flow on detail item creation.
2) Create a number type field on a master item.
3) Create a flow that will loop child records of the master record and put them to collection if they have an email that is different to ones that are already in collection and also will add 1 to a rollup field on master level.