
Document #374, Using Filters and Groups in GoldMine
Introduction
GoldMine’s filters and groups allow users to define criteria for searching based on selected field information. Applying a filter or group then temporarily “shrinks” the database, making it appear to contain only those contact records which match the active filter or group’s criteria. When a filter or group is active, users scrolling through the database with either a Mouse or the Page Up/Page Down keys will only see those contact records that meet the filter or group’s criteria; all other contact records are skipped and “filtered” from view.
GoldMine’s filters and groups allow users to gain greater access to their databases. Filters and groups provide users with a way to work with more manageably sized or project-specific, subsets of contact data. For example, filters and groups allow you to print reports containing only those contacts located in California or to globally replace/update a particular field for multiple contacts, such as when a new territory account manager is hired. Users can create filters and groups that compare multiple criteria. For instance, a single filter or group could evaluate records to determine which ones were created by a particular user, start with a 212 area code and have been contacted. However, filter expressions are limited to a length of 255 characters.
Fundamental Differences between Filters and Groups
GoldMine’s filters work dynamically. This means each time a filter is activated; it searches the entire database to select the records matching the filter criteria. GoldMine’s groups, however, are static. Groups are not dynamic. Once they have been created, they do not search the database again for matching records upon activation. This means after a group has been built, members are not assigned again until the group is rebuilt. Groups have the advantage of being indexed and work much quicker than filters, but will not update automatically when changes are made or records are added to the database. Groups also support a wider variety of methods to select from when selecting your search criteria. Filters have the advantage of being more accurate and up-to-date, but they work much slower and offer fewer options than groups.
Filter Concepts
The key to creating an effective filter is a solid understanding “how” filters work. Filters are based on Boolean expressions. Boolean expressions are logical statements that must be true or false. Take the following, sample expression:
“The Sky is Clear.”
This expression can be evaluated to only have two possible outcomes. It can either be clear, or not clear. If the sky is clear, the expression is evaluated to be true. If the sky is not clear, the expression is evaluated as false. When a filter is activated, i.e. applied to a database, every record is evaluated against the filter expression. If the record holds true for the filter it is included in the filtered subset. If the record does not hold true, it is not considered part of the filtered subset and is hidden or “filtered” from view. Remember, expressions are basic; they are either TRUE or FALSE.
Now, let’s consider a more relevant GoldMine expression:
“State is equal to "CA"”
When GoldMine evaluates this expression, it replaces “State” in the above expression with the data stored in the State field on each contact’s record. GoldMine then determines if the expression holds TRUE or FALSE. If the first three records encountered by the filter contained the following State data: CA, CO, and NV, GoldMine would determine the following:
|
Expression |
Result |
|
"CA" is equal to "CA" |
TRUE |
|
"CO" is equal to "CA" |
FALSE |
|
"NV" is equal to "CA" |
FALSE |
Only one record of the three would be selected for the resulting subset.
As previously noted, filters may be made up of multiple expressions to search for matches to more than one specific criteria. To find all contacts in the 310 area code, which also have 90260 zip codes, the filter expression would look similar to the following:
“Phone1 begins with "(310)" and Zip is equal to "90260"”
The “and” tells GoldMine that both expressions must be evaluated as TRUE for the record to be included in the filter’s subset.
To find all contacts in the 310 area code, or which have 90260 zip codes, the filter expression would look similar to the following:
“Phone1 begins with "(310)" or Zip is equal to "90260"”
The “or” tells GoldMine that at least on of either expression must be evaluated as TRUE for the record to be included in the filter’s subset.
AND & OR
Using “and” and “or” is very helpful in creating filters, but is sometimes confusing. In order for a record to be selected, an active filter must be TRUE for the currently evaluated contact record. When filters contain two or more expressions and the “and” is used, all of the expressions must all be evaluated as TRUE for a record to fit the filter’s criteria. With an “or”, any one -- and only one -- of the expressions must be evaluated as TRUE for a record to be included in the filtered data subset.
|
Expression1 |
AND/OR |
Expression2 |
Filter Result |
|
|
TRUE |
AND |
TRUE |
= |
TRUE |
|
TRUE |
AND |
FALSE |
= |
FALSE |
|
FALSE |
AND |
FALSE |
= |
FALSE |
|
TRUE |
OR |
TRUE |
= |
TRUE |
|
TRUE |
OR |
FALSE |
= |
TRUE |
|
FALSE |
OR |
FALSE |
= |
FALSE |
If a filter is used to select all contacts living in Texas, and that have the last name of Perot, or all contacts living in Arkansas, and that have the last name of Clinton, an expression similar to the following would be INCORRECT:
“State is equal to "TX" and Last Name is equal to "Perot" or State is equal to "AR" and LastName is equal to "Clinton"”
To see why, let’s examine how GoldMine evaluates this expression for a given contact record:
|
State is equal to "TX" |
must be TRUE to be selected |
|
|
And |
||
|
Last Name is equal to "Perot" |
must be TRUE to be selected |
|
|
Or |
||
|
State is equal to "AR" |
must be TRUE or FALSE to be selected |
|
|
And |
||
|
LastName is equal to "Clinton" |
must be TRUE to be selected |
Observe that there are 4 expressions to this filter. GoldMine reads expressions from left to right, evaluating criterion one at a time in this order. Based on this, for a given record to match the filter’s multiple criteria, 3 of the expressions evaluated as TRUE. But, the State field value for any one contact cannot be both "TX" and "AR" at the same time. In the same way, the Last Name field value for any one contact cannot be both "Perot" and "Clinton". Since no contact’s record can match these multiple criteria, nothing would be included in the filtered subset.
However, by using “parentheses” to separate the expression pairs, GoldMine is able to evaluate the expression in two parts instead of four. Following is the CORRECT expression:
“(State is equal to "TX" and Last Name is equal to "Perot") or (State is equal to "AR" and LastName is equal to "Clinton")”
To see why, let’s examine how GoldMine evaluates this expression for a given contact record:
|
(State is equal to "TX" and Last Name is equal to "Perot") |
|
|
or |
|
|
(State is equal to "AR" and Last Name is equal to "Clinton") |
GoldMine now uses and a user-defined order of precedence to logically compare records based on this two-part expression. If either expression is evaluated as TRUE, then GoldMine will select the record.
Creating a Filter
To build a filter, select Lookup>> Filters from the Main Menu bar to bring up the following Filters dialog box:
The following options are available from the Filters dialog box:
NEW - Create a new filter.
PROPERTIES - Make changes to a pre-defined filter.
DELETE- Delete a filter.
Activate - Activate the highlighted filter.
Release - De-activate the filter, displaying all database records. Unless a filter is active, this option is dimmed.
View Filters - Show filters belonging to other users of the system.
For this example, we will build a simple filter to search for records with the Source field equal to “COMDEX” and an area code equal to
“(818)”. (To work through the example, use the contact file “DEMO” which is installed automatically with your GoldMine. Select
File>>Open File, highlight the “DEMO” contact file and click on OPEN.)
All expressions consist of two parts: operators and operands. To understand, let’s revisit our earlier example:
“The sky is blue.”
In this simple expression, the word “is” acts as the operator and the words “sky” and “blue” act as operands. Operators determine the mode of comparison that determines whether or a statement is TRUE or FALSE in a particular instance. Operands act as the data to be compared and evaluated. For a filter to be created, at least three types of data must be selected: a GoldMine field (operand 1), an Operator, and a Value (operand 2).
Continuing with our “DEMO” example:
Verify that the filter profile is correct by reading it using the Show in English selection, then click OK.
If you wish to use sort options, select the Optimize tab. Observe the Sort Order, Top Limit and Bottom Limit windows. Limits initially restrict the number of records in the database that a filter will have to evaluate. Let’s examine how this works:
GoldMine uses Sorts and Limits to logically group relevant records in the database together. These search restrictions of “limiting” the actual number of records tested for a match significantly improves performance. Since we are testing for records with area codes that begin with “818,” it makes sense to not even evaluate records with “310” or “917” area codes. Remember the filter requires a record to begin with “818” and to have “Comdex” as the Source, so even if the Source is “Comdex,” the record is acceptable only if it also begins with an “818” area code.
Using Phone1 as one of the available Sort Order fields (which are GoldMine’s indexed fields) will reorganize GoldMine’s data by Phone1 ordering. Applying a Top Limit of “818” and a Bottom Limit of “818” will force the filter to exclude from evaluation any records whose Phone1 field values are alphanumerically “lower” than “818.” or “higher” than “818”. For instance, “819” phone numbers aren’t evaluated, for instance, since “819” is greater than “818,” i.e. it falls lower on list sorted by Phone1:
|
Order of Database Records Sorted by Phone1: |
|
(817)992-7000 |
|
(818)999-9872 |
|
(819)567-4448 |
By telling GoldMine to ignore or bypass records whose area codes are “higher” or “lower” on the list than “818,” a great deal of unnecessary and time-consuming record evaluation is eliminated.
Working with Filters
Now that the filter has been added to the Filters dialog box browse window you may use it to search for the desired records.
You could now perform a mail merge, a global replace, page between records, etc. and GoldMine would perform this action for the filtered records only.
Note: The Find Object, and Activity Object will continue to show all contact records.
Further information on using filters with GoldMine for Windows 95/NT can be found in the GoldMine for Windows 95/NT documentation.
Creating a Group
Keep in mind that groups may be built on a filter. Many times it is helpful to build and test your filter ahead of time, prior to using it to create a group. Experience working with filters can many times simplify the group building process.
To build a group, select View>>Contact Groups from the Main Menu bar to bring up the following Filters/Groups dialog box:
Many of these options require clicking your Right Mouse Button under the group name area to bring up the local menu as shown in the example above.
The following options are available from the Groups dialog box:
New Group - Create a new group.
Build a Group - Build (rebuild) an existing group.
Properties - Make changes to a pre-defined group.
Delete - Delete a group.
Activate Group - Activate the highlighted group.
Release Group - De-activate the groups, displaying all database records. Unless a group is active, this option is dimmed.
Select User - Show groups belonging to other users of the system.
For this example, we will build a group based on a filter, which you have already created to search for records with the Source field equal to “COMDEX” and an area code equal to “(818)”. (To work through the example, use the contact file “DEMO” which is installed automatically with your GoldMine. If you are not already in the “DEMO” database, Select File>>Open File, highlight the “DEMO” contact file and click on OPEN. Otherwise click CLOSE.)
Filter or expression - Builds group using a pre-defined filter or allows manual entry of dBase/xBase expression.
Previewed records - Builds group on records previewed from Preview tab in Filters/Groups menu.
Tagged records - Builds group based on records tagged using v3.20 on-the-fly record tagging options.
Scheduled calendar activities - Builds group based on pending (uncompleted) calendar activities.
Completed history activities - Builds group based on completed history activities.
Supplemental contact data - Builds group based on Profiles, Other Contacts, Linked Documents, and Referrals.
Search result - Builds group based on search results obtained by selecting Query>>Search.
Working with Groups
Now that the group has been added to the Groups dialog box browse window you may use it to search for the desired records.
Sort - Allows selection of sort criteria for member list.
Sync Record - Synchronizes record window with group member currently highlighted.
View - Allows viewing by contact, company, or both.
New member - Allows adding of a new member (current record displayed on screen.)
Delete member - Allows deletion of highlighted group member.
Properties - Allows editing properties of group member.
You could now perform a mail merge, a global replace, page between records, etc. and GoldMine would perform this action for the grouped records only.
Note: The Find Object, and Activity Object will continue to show all contact records.
Further information on using groups with GoldMine for Windows 95/NT can be found in the GoldMine for Windows 95/NT documentation.
Copyright (c) 2002 FrontRange Solutions Inc.
All rights reserved. You may use this document for personal and informational (non-commercial) purposes, provided that the copyright notice and all other notices and permissions appear in all copies, the document is not copied or posted on any network computer or broadcast in any media and modifications are not made to the document. Use for any other purpose is expressly prohibited by law, and may result in civil or criminal penalties.
The information contained in this document is provided “as is” without warranty of any kind. To the maximum extent permitted by applicable law, FrontRange Solutions disclaims all warranties, either express or implied, including warranties for quality, accuracy, merchantability, fitness for a particular purpose, title and non-infringement; and in no event shall FrontRange Solutions or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of profits or data or special damages, even if FrontRange Solutions or its suppliers have been advised of the possibility of such damages.