Using Groups in Search Builder¶
For any search that you run, there will always be a Group condition to hold all other conditions. Whenever you create a new search, the dialog with the list of Conditions will open automatically. If you do not select a Condition and run the search with an empty Group, you will get everybody in the database, except for deceased people.
So, you need to select a Condition and save it to the Group in order to filter the list. To add other Conditions click the green +Condition button.
Then once you have a condition, and configure it, you click the Save button. If you don’t save the condition, it will not get added to the search.
You can change the Condition after you have added it to your search by clicking on the name of the Condition, then clicking on the drop down arrow and selecting Change Condition.
A Group condition has three types of comparisons that affect how conditions are combined within the group. The default comparison is Match All. This means that all conditions must be true within the group for the person to pass through the filter and show up in your results.
The comparisons are:
- Match All - all conditions must be true for the person to be included
- Match Any - if any one of the conditions is true, the person will be included
- Match None - the person is included only if all conditions are false for him
For those of you who understand the language of boolean expressions here’s the equivalent:
Match ALL true would be like this:
- x=true AND y=true AND z=true
- where x, y and z are conditions that evaluate to true/false
Match ANY True would be like this:
- x=true OR y=true OR z=true
A Group condition can also hold as one of its conditions another Group condition. This way you can nest conditions together and each Group can have its own comparison (one of the three above).
You could construct a search like:
- x=true AND (y=true OR z=TRUE)
You add a group condition above an existing condition by clicking the gear icon > insert group above this.
You can add a group below your existing group by selecting the green +Group button.
Sample Search with Multiple Groups
This is an example of a search with 3 groups. Note that the top group has Match ANY and the other 2 groups are nested below the top group.
To fit the criteria, a person must meet the conditions in either of the other 2 groups.
In group 2, the top Condition is Match ALL. Anyone meeting the criteria would be a church member and have a Resident Code of Metro or Marginal.
In group 3, the top Condition is Match ANY. Anyone meeting those criteria would either have attended something recently or has joined something recently.
All people in the search results will be:
- A church member
- Living in the local area
- Has attended something recently
- Or has joined something recently
This purpose of this article is to explain how groups work. For more about how to build searches you will want to see our other help articles and videos.
Each Condition also has its own help article that you can access from within the dialog for Conditions by clicking the ?Help Article button beside the name of the Condition. There is also a list of all Conditions with links to the help articles on the Search Builder index.