I've been tasked with finding all customer that ha...
# general
e
I've been tasked with finding all customer that have only 1 contact and making that contact the "Primary Contact". Anyone know how to find all customers with only 1 contact? I tried a summary search of customers thinking I could do count of "contacts" = 1 but contacts is not a choice for fields.
s
Count of Contact fields... internalid maybe?
e
Yup, totally that. Forgot to check for the contact join. Thank you!
or... in theory this should work. My criteria is a summary type = "count", field= "contact : internal id", description= "is 1". Yet all of my customers are showing...
s
Yeah counting joins in criteria could get pretty weird I would imagine
I honestly prob wouldn't code it into criteria, and just take the results and process them that way
s
I had a similar requirement, but had to find customers with exactly one contact that had an email address, and used this numeric formula
CASE WHEN COALESCE({contact.isinactive}, 'F') = 'F' AND {contact.email} IS NOT NULL THEN 1 ELSE 0 END
then I use Summary Type SUM on that formula column, and GROUP on Customer Internal ID, and look for results where the SUM of that formula equals 1
e
Thanks to you both. It looks like things clear up when I do grouping/counts in my Results. For whatever reason, if I dont group Customer IDs and don't count Contact IDs, I get back all customers. But when I group/count, I only get back a portion (as anticipated)