Using the Search BuilderConceptsThe Search Builder allows you to create and save complex searches (queries) by combining multiple search fields into search clauses (referred to as criteria sets). Each criteria set can have one or more search fields (criteria). For example: Find contacts whose primary address is in California AND who are in the Newsletter Subscribers Group. The search fields within a criteria set are always combined using AND - so the resulting records must meet each and every criteria in the set. If you need to find records which meet criteria A OR criteria B - you use additional criteria set(s). These are labeled Also include contacts where... in the Search Builder. Building on our first example, we would use two criteria sets to get these results: Find contacts where the primary address is in California AND who are in the Newsletter Subscribers Group This example might also be described using parentheses to group the search criteria: For folks who are more used to database query terminology...multiple search criteria in a set are AND'd together. Multiple criteria sets are OR'd together. Creating a Search Builder QueryStart by deciding which fields and values you want to use as your search criteria and how you want to combine them (AND and OR phrases).
The columns returned in your search results always include the contact Sort Name PLUS a column for each search criteria you've included in your query. For example, if you're searching on State and Birth Date and Most Important Issue (a custom field) - these are the columns you'll see in your results. The only exceptions are Group(s) and Tag(s) which are currently not included in the results columns.
You can take any of the actions with your search results as you can with other CiviCRM search methods. This includes Export, Print, Delete, etc. Special Search CriteriaSearch Builder requires special values when matching on values which are stored as keys in the data. This includes Groups, Tags, States, Countries, yes/no (boolean) fields and multiple-choice custom fields. Specific date formats are also required.
Saving a Search QueryIf you want to re-use a Search Builder query - you can save it as a Smart Group.
You can now re-run this query anytime by selecting your smart group from Manage Groups. |
Search Builder
Skip to end of metadata
Go to start of metadata
Labels:
