Exporting Related Contacts From CiviCRM

When you’re working with your CiviCRM data, there are a bunch of scenarios where you might need to export related contacts.  That is, you’re creating a list of contacts that meet certain criteria, but you also want your search results to include records that are connected to those contacts.  For example:

You want to see a list of households... and the people related to them.
You want to pull a list of member organizations... and their employees.
You want to pull a list of donors... and their spouses/partners.

This is actually a very simple task in CiviCRM!  Here are the basic steps.

Complete your search, using the desired criteria.

Let’s use the households example here: Start by pulling a list of all the households in your database that have household members, by searching for contacts of type “Household” with relationships of type “Household Member Is” as shown here. (Since we’re looking for ALL households with members, not just a particular one, we’ll use CiviCRM’s wildcard character, the percent sign, in the Target Contact field):

Configure your data export.

Once you’re happy with your search results, select “Export” from the Actions menu, then choose the option to select your own fields.  And here is where the magic happens: first add the relationship (“Household Member is”) as a row in your field selection, and then choose the field(s) you want to see for the household members. By working through the relationship, you have access to any searchable data about those related contacts.

We encourage you to try this in your CiviCRM.  Have questions, or need a deeper discussion about how to access and utilize your data to the fullest extent?  Contact your support email and we’ll be delighted to assist you.

Related Blog Posts

WE CAN HELP YOUR ORGANIZATION

TELL US ABOUT YOUR PROJECT

Technologies for Nonprofits