1

Civi 5.15.1, WordPress 5.4.1

Some of our contacts ask us to send our communications to someone else, a "designated contact" or DC. To accommodate them, we created custom Contact Reference fields for email and phone/text, and for mail we use Civi's built-in "Use another contact's address" feature. To mark someone as a DC, we created a Contact Subtype and a Smart Group based on that subtype. However, new DCs don't come around that often, so our back-end data entry staff haven't consistently remembered to use the subtype. Also, we wouldn't otherwise need the subtype because there are no custom contact fields associated with it. We just need the Smart Group.

So I was hoping to get rid of the unnecessary subtype step, and modify the Smart Group to be comprised of contacts who are the selected values for either of our custom Contact Reference fields or Civi's surrogate address field. I've looked at Advance Search, Search Builder, and the Custom Searches, to no avail. Is such a thing possible? Thanks.

  • what CMS? in case Drupal Views or WP equivalent can sort this. and side question. do these sub contacts have other data that is useful, or is it really only a way of recording the alternative email/address? just wondering if another Location Type might suffice. probably not but ... – petednz - fuzion May 12 at 19:09
2

Lack of searchability is one of the downsides to using Contact References.

1) One option is to use Relationships instead of Contact Refs. You can create a smart group based on those - but you would need to convert your existing Contact Refs and associated processes.

2) Jaap's DataProcessor extension can help.

  • Add a Data Source of type Individual - call it Person
  • Add a second Data Source of type Individual - call it DC.
    • Join type as 'Select fields to join on'
    • Join on Field: Contact ID = Person::custom group::DC contact ref
  • Add fields for the fields you want to display for Person and/or DC using 'Raw field value' - include the DC contact id.
  • Add an Output of Contact Search

That will search for contacts who are DC's and show the fields you configure.

Although Contact Search has an action to create a smart group, I have not got that to work with DataProcessor (yet) - so it does not completely solve your problem. You could though run it and add the found contacts to a static group.

I guess Jaap would welcome any PR's or sponsorship to make smart groups work as a dataprocessor output.

| improve this answer | |
  • Aidans answer is correct. I have been working with two clients who have a membership with a household but the e-mail correspondence is with the head of the household. So in that case I created a data processor to show the head of the households of families with a membership. – Jaap Jansma - CiviCooP May 12 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.