We need to be able to see the common relationships between two contacts. Or essentially, who they both know and organizations they both have a relationship with.

For example, between Contact A's relationships and Contact B's relationships, display those relationships they have in common.

We would want this to be a tab or an on demand function if possible, like plugging in two contacts in a form to see the result.

We use search kit and form builder for a number of things and I feel like the solution is right in front of me but just can't seem to design a search to do it.

Also using Wordpress version of Civi.

1 Answer 1


This is possible with SearchKit. I can't recall how to create a URL that lets me copy a SearchKit, but I'm attaching a screenshot and instructions.

  • Search for Contacts.
  • Add a With (required) to Contact Related Contacts.
  • Add a With (required). Now, when you select the new entity, you'll see Contact Related Contacts listed twice - once under Contacts and once under Contact Related Contacts. Select the one under Contact Related Contacts.
  • In both cases, remove the condition that specifies the relationship type, since you want any relationship.

So now, you have a search that's looking at three people:

Contact 1 <==> Contact 2 <==> Contact 3

When you search for Contact 1 and Contact 3, the search results for Contact 2 will be the person(s) that have a relationship with both.

Once you have the basic search down, you can modify the columns returned, and add a display to hide all this from the users, so they can just select contacts 1 and 3 by the criteria of your choice (contact ID, names, etc.).

enter image description here

  • Great, that's perfect. Thanks! Commented Jan 7, 2022 at 0:04
  • I have the search set up and have it set up in Formbuilder, but it doesn't appear in a way that can be used. Either on the Tab or as a block on the summary page. How do you get it to display to be used? I'm trying both search forms and cutom forms in formbuilder. Commented Jan 7, 2022 at 20:14
  • Looking at the documentation here: docs.civicrm.org/user/en/latest/the-user-interface/search-kit Commented Jan 7, 2022 at 23:47
  • @Phelan I designed this around the idea that it would be a form. Creating this as a tab or block on a contact is beyond the scope of this question, but you would a) use Form Builder, b) it should be a "Search Form", c) you would remove the "Where" statements. Then you would d) select "Filter on Contact" from the Form Builder settings, e) on the "Table" field of the Form Builder, select "Display Name" as a field to add (the second one, not the first one!). d) will "pre-select" the current contact, and e) lets you search for the other contact. Commented Jan 7, 2022 at 23:52
  • Great, THANKS! So I'm assuming you are referring to Custom Forms in Formbuilder for the form approach? Commented Jan 8, 2022 at 0:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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