Tip: Making the most of 'Display Results As' in Advanced Search
CiviCRM has a lot of clever functionality but it isn't always easy to find. I wanted to share with people a very useful feature that is hiding 'in plain sight' on the advanced search form. I've pointed this out to folks a few times during trainings, and it seems to be something that quite a few people (even those that have been using CiviCRM for a while) have missed. Maybe this is because there are many other buttons competing for your attention on the advanced search page. Or maybe it's because once you have familiarised yourself with a page, it is easy to miss extra options that appear during upgrades. In any case, here is a quick look at what 'Display results as' can do for you.
Have you ever wanted to
- search for event participants but found the options in the Find participants screen too limiting? Maybe you want to find all event participants that were also members.
- search for contacts based on information about a related contact? For example all employees of all organisations that work in a particular sector?
Then 'Display results as' can help! It gives you all the power of an Advanced Search, and allows you to view all those objects that you'd only normally see in Component searches (like Find participants, Find memberships etc.)
The functionality is quite simple to use. I'll walk through a couple of quick examples.
Lets say I wanted to find out how many event attendences were by members. I'll do this one on the demo site (http://demo.civicrm.org) - feel free to try it out there.
- First bring up a new advanced search screen (or reset the advanced search form by clicking Reset Form)
Then select the criteria - two in this case (from Display Results as, choose 'Event Participants', andfrom the Events fields, choose 'Attended')
- Hit search. At this point, what we have is list of all people that have attended events. Admittedly, up until this point, we could have used the Find participants search to do this.
- But now, we can add in any other criteria that is available in Advanced Search. So lets open the membership pane and select all the membership types.
- Hit search again and we can now see that the results have been filtered down to participations from members.
How about finding contacts based on information stored on related contacts? Lets say I wanted to find all employees of organisations with a turnover of over $1,000,000. I can use the Display Results As to do this as well. In this example, I'm assuming that you've created a custom field for organisations of type 'Money' where you are recording their income and you've made searchable by range (feel free to add this field to the demo and add a couple of example data fields).
- First, look for organisations with an income over $10,000,000 (it's worth running the search at this point to make sure you have the correct criteria).
Then choose Related Contacts from Display results as, and choose employees.
- Hit search
- This time, instead of displaying the organisations, CiviCRM will display employees of the organsiation - quite powerful IMO.
Don't forget that at this point you have all of CiviCRM's advanced search actions available to you. So you could potentially save this result as a group and carry out another 'related contact search'. For example, all children of people that work in organisations with an income of over $10,000,000. One potential use of this would be to identify kids to take hostage, based on the fact that they their parents' employer will pay the ransom, though I would recommend investigating other ways to meet your fundraising targets before you do so.
If you are using this functionality, feel free to share your experiences on how you are using it. And if you are using other 'hidden' CiviCRM functionality, why not share your tips so that others can benefit?