As important as it is to understand and become familiar with the contact record interface, we also need to be able to quickly find records in the system. We started our exploration of CiviCRM by looking at the quick search field in the navigation bar. Search | Find Contacts extends this to allow filtering by contact type, group, or tag. Beyond this basic search, CiviCRM provides four power tools for searching and additional diverse functionality through the reporting system.
Quick search is found in the navigation menu, and is best used when you are looking for a specific contact. The text entered into this field will search e-mail addresses (by default) and the contact name (sorted by name for individuals, household name for households, and organization name for organizations). The search will return results for partial matches as you begin typing. You have the option of configuring the tool to use full wildcard searches or only ending wildcards (Administer | Configure | Global Settings | Search Settings).
Full wildcard searches will look for the entered text in any part of the name or e-mail fields. For example, entering "john" would find both John Smith and Mark Johnson. With wildcard search turned off, a search for "john" would only find Mark Johnson, as the sort name field is constructed as "lastname, firstname" by default. Full wildcard search is very useful in small datasets as it provides greater flexibility. For large databases, you will typically want to turn this off as the result sets will become long and cumbersome.
If the full wildcard option is turned off, you may still initiate a wildcard search using the percent symbol (%). You may even use the wildcard value in the middle of a search term; for example, J%n will yield John as well as Jones. This "%" character matches any number of characters wherever it appears in your search strings.
Clicking on Search | Find Contacts brings up a form that allows you to search by name or e-mail and filter the results by contact type, group, and tag. Entering more criteria reduces the number of matches, as the results must match all of the criteria entered. As with the contact quick search, you may use wildcards to extend how the search is conducted.
Don't let the term "advanced" scare you away—it's a commentary on the powerful capabilities of this tool, not a statement about how much experience with CiviCRM is required. In fact, the power of advanced search lies in both its flexibility and ease of use. To access this tool, navigate to Search | Advanced Search.
Advanced search provides a window into just about every field in your system, grouped by their type. Using the paneled interface you can build search criteria across address fields, contributions, membership, events, custom fields, and any other type of data you are managing.
The only significant limitation of the advanced search tool is that multiple criteria across the fields are always joined by the AND operator. If you are familiar with any form of query building, you will recognize the difference between joining multiple criteria with AND versus with OR. AND joins are exclusive—as you add more criteria, your result list becomes smaller as more records are excluded because the records must meet all of the criteria provided. OR joins are inclusive—adding criteria expands the result list as any record meeting any of the individual criteria will be included.
The only exception to this rule in advanced search is the fields presented as a multi-select option list (including a set of grouped checkboxes). These will be joined with OR within that field. For example, selecting multiple tags will yield results matching any of those tags.
Be aware that a few special fields reverse the normal selection logic. For example, selecting any of the privacy options will exclude records meeting that criterion rather than including them (reflecting the normal use of those fields). If you are looking to retrieve a list of contacts who have a certain privacy setting, check the option titled Include contacts who have these privacy option(s) in order to reverse the default effect.
As always, inline help text (question mark icon) will provide an explanation and example for non-standard or potentially confusing fields.
Have you ever had an experience where you interact with a constituent, perhaps at an event, and can only remember a fragmented snippet of the conversation? You only remember their first name; or was that actually their street address?
CiviCRM's Full-text Search scours through contact and related records, delivering a list of results grouped by the record type (contacts, contributions, memberships, and so on). In addition to serving as your partial-memory sleuth, full-text searches can help you find records where the location of the data you're looking for may not be in an obvious location. For example, you might recall recording details about the Smith's family, but are unsure if it was part of an activity, note, or contribution record, or whether it was attached to Mr. Smith, Mrs. Smith, or their combined household record. Searching for the term "family" yields all instances of the text, allowing you to quickly browse through the search summary and find the information you're looking for.
A full-text search is accessed through Search | Full-text Search, and may be conducted across all major record types, or may be limited to a single type.
Drupal users may enable a Block to provide convenient access to full text search. In Drupal, go to Administer | Site building | Blocks, find CiviCRM Full-text Search in the Disabled section, use the icon to its left to drag and drop it in the region you would like the block to appear, and click on the Save blocks button. Like any block, you can configure when it appears by clicking on the Configure link beside the block name. For example, you might want to set Show block for specific roles to a CiviCRM administrator role.
If advanced search doesn't meet your specific querying needs, CiviCRM provides a search builder to construct criteria sets based on logic statements. Most often, this is needed when your search criteria must include several statements joined with the OR operator (you recall from the Advanced Search section that the primary limitation of that tool is the inability to specify a more inclusive (OR) selection).
Querying... logic statements... operators... criteria sets... huh? The search builder is powerful, flexible, and requires some advanced skill to properly construct a search. For most (if not all) of your searching needs, the advanced search and other tools should prove more than sufficient. However, if the other tools do not completely meet your need, you have the search builder available as a powerful tool in your back pocket.
The builder lets you construct multiple sets of criteria. The criteria within each set is joined by AND. The sets are combined together with OR. That allows you to create exclusive (AND) criteria and join it with inclusive (OR) sets of criteria.
The search builder is accessed through Search | Search Builder.
FPAGM plans to do more regional outreach to food suppliers in the outlying areas of Metropolis and suburban areas surrounding the city. The outreach will be focused on soliciting more commitments for food donation support during the difficult winter months, when demand at the food pantries increases significantly.
The Executive Director has identified the following criteria to be used for the initial outreach letters:
The resulting configuration in the search builder will look as shown in the following screenshot (the OR and AND text has been added for illustration):
As you can see, our selection consists of three sets of criteria, which are joined together to yield the result. A food supplier or organization meeting any of the three criteria sets (two of which have multiple restrictive criteria) will be included in the results.
There are several things to keep in mind when working with the search builder:
All of the search tools we've reviewed so far are contact-based. Regardless of what criteria you choose, the search will return a list of contacts.
What if I need a list of all contributions over $500 made within the last six months? If John Doe has donated more than $500 three times over that period, I would expect to see him listed three times; the fact that he is a regular donor is important information to see in this context. However, searching through the Advanced Search (where I have access to the contribution fields) or the Search Builder (which likewise can use contribution fields) would yield a list of contacts with no duplicate values.
Throughout CiviCRM, there are typically two "lenses", or perspectives, through which you can search and view records—you can search for contacts, or you can search for their related records. We call the "related record" search a component search. These tools can be accessed through the main Search menu (designated in the second block of options) or in the respective main menu item (for example, Find Participants is found under Events).
Considering the preceding example, searching for this criterion under Advanced Search would yield one record per contact. Conducting this search using the Find Contributions form would yield three records, one per contribution.
We will investigate these tools further when we work with some of the components. For now, it is important to understand the difference in how you search and what type of results are being returned.
If you still find that you need to conduct a complex search that cannot be accomplished using one of the tools above, review the custom searches found in Search | Custom Searches....
The custom search structure was created as a way for developers to build customized, complex search options and result lists that could not easily be accomplished through the generalized forms. Let's face it—not every possible search option can be squeezed into a single interface without creating complexity and confusion that will render the tool unusable for the average user. Rather than leaving you to work directly in the database, CiviCRM created the custom search structure to provide an interface for developers to meet these specialized needs.
Existing custom search forms are often being improved and new ones are added to the system by the CiviCRM development community. Understand that to actually create a custom search form, one must have development skills (and access to the database and code). However, once built, sufficiently permissioned users may access the forms and run searches. If you build a custom search form, consider contributing it back to the project for inclusion in future releases.
The full list of available custom searches can be accessed by going to Search | Custom Searches.... (Note that the fly-out submenu only displays a few of the search forms by default.) Some of the more useful searches include:
The list above is just a partial review of the custom searches available. Take time to familiarize yourself with the tools available as you may want to make use of them as you work in the system.
By default, CiviCRM only includes a few custom search forms in the Custom Search fly-out menu (main Search menu item). If you find that you are using certain custom searches frequently, consider modifying your navigation menu to include the desired page in the search menu item listing. Visit Administer | Customize | Navigation Menu to configure the navigation menu.
3.144.82.21