Formula to add email address in name formula in case of duplicate contact

I currently have a name formula in my contact database that combines first name and last name of a contact. Now I want to add the email address in case that a contact with the same first name and last name occurs more than once in contact database. So that it ultimately shows as ‘Yvette Lans - yvette@acceleright.nl’ if there are two Yvette Lans.

It shouldn’t be that hard. But tried several things without any success.

Hope somebody can help me out :sweat_smile: Thanks in advance!

Have you tried

FirstName + " " + LastName + " - " + Email

Yes, but there should be some logic.

  • If a contact occurs once with first name + last name, then formula should be "FirstName + " " + LastName + " - "
  • If a contact occurs more than once in contact database then it should be “FirstName + " " + LastName + " - " + Email”

My idea was to create a checkbox that decides if a contact occurs more than once. If so, then that checkbox will trigger in name formula that + Email should be added.

For the checkbox I was thinking about something like this
Contacts.Filter(
[First name] and [Last name]
).Count() > 1,
true, false

But can’t use Contacts.Filter :woman_shrugging:t2:

Could do it via automation but rather do it via formulas in contact database.

So you want to not show the email if the contact is not a duplicate?

You could create a (hidden) many-to-many self relation that matches first name and last name, and then use
FirstName + " " + LastName + if(Matches.Count() > 1," - " + Email,"")

1 Like

That’s briliant! Thanks again!!