Filters and Focus Groups 
Canberra TMG User Group:  21st Oct 2008

Filters
Filter the Picklist

Filter the Picklist so that only selected names appear. This is intended to be used for special studies, not for routine name searches. 

NOTE: It will take longer to generate the Picklist when a filter is in place.
 
You may activate one or more of the filter options at any time.
 
To access the Filter the Picklist screen:
From the Picklist, select [Filter].
   Lookup: Picklist
 
Saving Filters
If you have a filter or filters that you use often, you can save the filter and reload it again at a later time. Sample filters are also included with the program.
 
To save a filter:

1. Enter the filter in the Filter the Picklist window.
2. Click on [Save as].
3. Enter a name for the filter in the Save .FLP file field and click on [Save].
 
To load a previously saved filter:

1. From the Filter the Picklist window, click on [Load].
2. Highlight the name of the filter to be loaded and click on [Load].
3. Click on [OK].
 
To copy a filter to the Project Explorer:

1. From the Filter the Picklist window, check Copy filter to Project Explorer on exiting.
2. Click on [GoTo] or double-click on the name of the person that you want to go to.
 
There are two ways to create filters: design one on the Filter tab or design one on the Query by Example (QBE) tab by filling in the provided fields. Use the Filter tab if you have experience creating filters, or if the filter is more complex. You can create a filter on the QBE tab and then look at the Filter tab to see what it looks like -- a helpful tool when you are learning to create filters.
 
 Filter Tab
 You can filter by Title, GivenName, PreSurname, Surname, Suffix, Other Name, SortSurname, SortGiven, Data Set ID, or by any flag. In addition, there are many other filter options including tags and tag groups, and # of... filters. Up to eight filters can be used at the same time. On the eighth filter, END will be assumed. The number of names in the list is displayed in the window heading. 
 
Primary/Non-Primary Names
You can also set a display filter for Primary names or Non-primary names or Both
 by checking the boxes near the bottom left of the window. This is a selection of what names will display in the Picklist after the filter is run. The number of names in the list is displayed in the window heading. Checking Primary names without any filter will give you a count of the number of people in the project. But don't forget, when the Picklist is filtered in this fashion, married names, nicknames, and other name variations will not appear in the list.

 NOTE: If you have created and saved a filter, the selection of Primary names, Non-primary names, or Both is saved with the filter. If you do not save the filter, the setting is returned to both the next time you start the program.

To enter a filter:
1. Click on the down arrow next to the first filter field and select whether to filter by Surname, Title, Given name, Suffix, or by a flag.
2. Click on the down arrow next to the operator and select: Contains, =, <> (not equal),
 >= (greater than or equal to), <= (less than or equal to), > (greater than), < (less than), Equals, Like, Begins with, Ends with, Sounds like by clicking on the appropriate choice.

NOTE: The operators that are available will vary depending on the field that was chosen.

3. Enter the search strings in the appropriate name field(s). (See Wildcards and OR below.)
4. Select AND, OR, or END. If you use AND, only those records that match both conditions will be selected. If you use OR, all records that match either condition will be selected. END signifies the end of the filter definition.

Wildcards
Wildcards ( ? and * ) are allowed.
  ?  -  The ? will match any one character. For example, H?T will match "hat" or "hot" or "hut".
  *  -  The * will match any string of characters. For example, MER* will match Merry, Merriment, Merrimac, Mercy, etc.

 NOTE: Wildcards do not work with the = operator. Use Like.

OR
A vertical line (|) may be used as a delimiter signifying OR within any value field. For example, BOB|ROB will match BOB OR ROB. You may use more than one OR; for example, BOB|ROB|JIM|TIM.

Lookup:  Filter and Accent Examples, More Accent and Filter Examples

 Conditional Brackets
If you use both an AND and an OR connector, gray boxes will appear to the left and right of each line. Click on the box to create a parenthesis. For more information, see Parenthesis in Define Filter for Reports
  
Clear Filters
To clear the Picklist filter:

1. From the Picklist screen, select [Filter]
2. From the Filter the Picklist screen, select [Clear].
3. Click on [OK] to exit the Filter the Picklist window.
 
QBE Tab
 Lookup: Query By Example
 
Filter the Project Explorer

Filter the Project Explorer so that only selected names appear. This is intended to be used for special studies, not for routine name searches.

NOTE: It will take longer to generate the Project Explorer when a filter is in place.
 
You may activate one or more of the filter options at any time.
 
To access the Filter the Project Explorer screen:
Click on  in the Project Explorer or select Edit > Filter the Project Explorer from the menu.
  
To clear the Project Explorer filter:
Lookup: Clear the Project Explorer filter
 
Saving, Loading, and Deleting Filters
If you have a filter or filters that you use often, you can save the filter and reload it again at a later time.
 
To save a filter:

1. Enter the filter in the Filter the Project Explorer window.
2. Click on [Save as].
3. Enter a name for the filter in the Save FLP file field and click on [Save].

NOTE: Filter names have the same restrictions as file names in Windows, i.e., some special characters such as "?" or ":" are not allowed. For more information on file naming, see Windows help.

To load a previously saved filter:

1. From the Filter the Project Explorer window, click on [Load].
The Load Filter File Definition window will appear.
2. Select the file to be loaded and click on [Load].
3. In the Filter the Project Explorer window, click on [OK].

OR
From the Project Explorer, click on the down arrow next to the field at the top of the Project Explorer window and select a filter from the list.
 
To delete a filter definition:

1. From the Filter the Project Explorer window, click on [Load].

The Load Filter File Definition window will appear.

2. Select the file to be deleted.
3. Press <Delete>, or right-click and select Delete.
4. Answer [Yes].

Filter the Master Place List
The Master Place List can produce a filtered Master Event List with events that happened at the selected place.

NOTE: This is a quick way to get a list of events that match all fields in a place record. For more complex filtering, use a List of Events report.

To produce a filtered list of events:

1. From the Master Place List, highlight the place record and click [Events].

The Master Event List window will appear.

2. Highlight the correct event.

To edit the selected event:
Click [Edit].
The Tag Entry screen will appear.
 
To go to the Person View of a Principal in the event:
Click [Go to Principal 1] or [Go to Principal 2].
or
Double-click on a person's name in an event.
 
To exit the Master Place List:
Click [Close] or press <F9>.

In the Report Definition screen for many reports, you may define a filtered group in order to select a subset of individuals for whom data will be drawn for a report. It is possible to construct complex queries with relative ease using the "choose from a list" approach. The reports which cannot be filtered in this way are the Linear Ahnentafel, the 4- and 5-Generation Pedigrees, and reports such as Bibliography, Endnotes, Index and Table of Contents.

Constructing logical queries may be a new concept. You are encouraged to experiment with the filter possibilities to become acquainted with this operation. You may wish to use the SAMPLE data set for this purpose, as it is probably smaller than your own. Follow the on-screen example for guidance.

NOTE: Complex filters may take quite a while to process.

For example:
Using a filter to identify multiple progenitors for a descendant or ancestor report allows you to produce, for instance, a single report with all of the descendants of all of your end-of-line ancestors. Unlike multiple reports, which might cover the same people, a report with multiple progenitors will have separate sections for each line of descent with pointers where the lines intersect (see also). Since this "see also" feature is already included in 4- and 5-Generation reports (if you deselect Repeat Duplicate Lines), it is unnecessary to have these two reports filtered by multiple progenitors.

NOTE: You should always use <Tab> to move from field to field on this screen.  Pressing <Enter> will activate certain options. For more information, see Tips and Tricks at the bottom of this page.

There are two ways to create filters: design one on the Filter tab (most reports) or (in the List of People report) design one on the Query by Example (QBE) tab by filling in the provided fields. Use the Filter tab if you have experience creating filters, or if the filter is more complex. You can create a filter on the QBE tab and then look at the Filter tab to see what it looks like -- a helpful tool when you are learning to create filters.
 
Filter Name
To load a saved filter:
Click on the down arrow next to the Filtered group option and select the filter from the drop down list.
 
To add a new filter:

1. Click the radio button next to Filtered group and click [Add].

The Report Filter window will appear.

2. Type a name for the filter in the Save filter as field.

NOTE: Certain special characters, such as " or /, may cause problems when used in filter names. You should avoid using characters that are used by Windows for other functions.

Parenthesis
If you set at least one OR and one AND parameter, you will see a single-character field for an open left parenthesis at the left of the window. There is a corresponding field for the close parenthesis after the Value field. For every opening parenthesis there must be a closing parenthesis, and vice versa.
 
To insert or remove the parenthesis:
Click on the gray box to create a parenthesis.
 
The parentheses are used to control the logic in evaluation of more complex filters. For example,

Surname=SIMPSON AND
(GivenName Begins with J OR
Given Name Begins with R)
will find everyone with the last name SIMPSON and a given name beginning with either J or R. If you move the parentheses in the following fashion:
(Surname=SIMPSON AND
GivenName Begins with J) OR
Given Name Begins with R
you will see everyone who has a last name SIMPSON provided their given name begins with a J, and you will see everyone whose given name begins with R -- no matter what their surname is.

Primary
An asterisk (*) represents a primary tag or tag group. 
To filter for only primary events:
Check the box beneath the *. This box will appear only when it is appropriate.
 
Field
To bring up a list of possible flags, tags, or tag groups for use in the filter:
Click on the down arrow to the right of the Field column and select the flag, tag, or tag group from the list. If you select a tag (other than a relationship tag) or a tag group, you may also select a sub-field for the filter.

To select a flag, tag, or tag group:
1. Click on the down arrow next to the Field.
2. Either: 

·	click on the flag, tag, or tag group
·	highlight the flag, tag, or tag group and press <Enter>

or

·	highlight the flag, tag, or tag group and press <Spacebar>.

Lookup: Filter Options
Operators

To bring up a list of possible operators:

Click on the down arrow to the right of the Operator column and select from the list.

The list will include all operators which are appropriate for the type of entry in the field column. Not every operator will be available for a given field type. Depending on the report and flag, tag, or tag group chosen, operators may include:
•	Equals            
•	Does Not Equal    
•	Is Less Than      
•	Is Not Less Than  
•	Is Greater Than    
•	Is Not Greater Than
•	Contains            
•	Does Not Contain    
•	Begins With        
•	Does Not Begin With
•	Ends With          
•	Does Not End With  
•	Comes Before        
•	Does Not Come Before
•	Comes After        
•	Does Not Come After
•	Is Empty            
•	Is Not Empty
•	Contains "?"        
•	Does Not Contain "?"
•	Is "Old Style" (for dates)
•	Is Not "Old Style" (for dates)
•	Is Regular (for dates)
•	Is Irregular (for dates)
•	Is Between (for character fields)
•	Has Modifier (for dates)
•	Has No Modifier (for dates)
 
NOTE: The OR value separator (a vertical line) can be used on character fields; for example, GivenName Equals Alexander|Smith. The Is Between operator supports two character values separated by a comma; for example, GivenName Is Between A,B. The Is Between operator and the OR (|) value separator do not work with numeric values because characters cannot be typed in the value field, and they cannot be used together. For example, GivenName Is Between A,B|C,D will not work.

Value
Type the appropriate entry for the value to be searched for in the query in the Value box. 
	or
You may choose to enter [?] in the value field to have the report prompt for the value at the time it is generated.

NOTE: If you are entering a date as a value, the format of the date does not matter so long as it is a valid format. If you use a numerical format, however, you must be aware of whether you have chosen a month-day or day-month format in File > Preferences > Program Options: General. It is important to match the value that you enter to the type of data that you have chosen to filter by. For example, if you are filtering for a Date, enter a whole date in the value field. If you want to enter only a year in the value field, then filter for Date-Year.

Connect
Selection criteria can be combined by logical connectors to create compound queries. 

To bring up a selection list of possible connectors:

Click on the down arrow to the right of the Connect column and select the connector. Possible choices include:
•	AND
•	OR
•	END

Caution: END clears all selection criteria that follows.

Example:

Any Birth Group State Contains [?] AND
Any Birth Group Event(s) Date-Year Is Not Less Than [?] END

 Using AND will select all of the records which meet the criteria in both statements. In the above example, everyone who was born (or baptized or christened, etc.) in a particular state in or after a certain year would be selected.

 Example:

Any Birth Group State Contains [?] OR
Any Birth Group Event(s) Date-Year Is Not Less Than [?] END
Using OR will select all of the records which meet the criteria in either statement. In this example, everyone who was born (or baptized or christened, etc.) in a particular state and everyone who was born in or after a certain year (no matter what the state) would be selected.

NOTE: See Tips and Tricks at the bottom of this page for more information.

Additional Options

The following check boxes are applied after all filter criteria are processed. That is, they operate on the filter group.

[   ] Spouse(s)

When this option is selected, an individual will be included in the current report if he or she is recorded as a spouse of someone who otherwise qualifies under the filter conditions.

[   ] Ancestor(s) ____ generations

When this option is selected, an individual will be included in the current report if he or she is recorded as an ancestor of someone who otherwise qualifies under the filter conditions.  You can specify the number of ancestor generations to be searched.

[   ] Descendant(s) ____ generations

When this option is selected, an individual will be included in the current report if he or she is recorded as a descendant of someone who otherwise qualifies under the filter conditions.  You can specify the number of descendant generations to be searched.

NOTE: These last three options operate only on the filter group - not on one another. For example, if all three of these check boxes are selected and John qualifies for the filter "Birth State=PA", for example, then his wife (or wives), ancestors, and descendants would be included, regardless of their state of birth. His wife's ancestors, however, would not be included unless they happen to have been born in PA, in which case they would already be on the list.

To target people who are ancestors or descendants of a particular individual: 

Besides the check boxes described above, you may also use "Is an ancestor of..." or "Is a descendant of..." in the field list for the filter. 

Tips and Tricks

Tip #1

End of line ancestors can be identified easily by filtering for:
Father* Is Not Known	To find those individuals who have no defined father.

or

Father* Is Not Known OR
Mother* Is Not Known	To find those individuals who have only one defined parent or no parents.
 
or

Father* Is Not Known AND	
Mother* Is Not Known	To find those individuals who have no defined parents.

Tip #2
Defining filters and writing reports can be a bit tricky at first, especially if you've never done it before. Some things are not readily apparent. For example, let's say that you want to print a list of people who have events which occurred between certain dates. It might seem to you that the filter in a List of People report should be:
 
Any Event Group(s) Date-Year Is Not Less Than [?] AND
Any Event Group(s) Date-Year is Not Greater Than [?] END

 This appears to be logical, but it is not correct. The trouble is that in a List of People report there is nothing that says that the two clauses have to apply to the same event. That is, anyone who has a tag dated earlier than X and has another tag dated after Y will qualify. In addition, an undated tag is sorted "Not Greater Than" everything else. If you want to test the range of a date, then you need to do a List of Events report. Two similar filters will then be tested against the same date.

Tip #3
If you are able to access the Internet, you may want to visit:
http://www.geocities.com/allenmellen/treetop.html
 
This user-constructed web page contains tips for creating filters.
 
Tip #4
Say or est dates are not the same as circa dates when filtered. When filtering a say or est date, the program will find the specific year included in the date field. When filtering for circa dates, the filter looks for dates within 20 years (plus or minus) or within the number of years specified in File > Preferences > Current Project Options: Advanced.
For example, one tag has a date of say 1880 and another tag has a date of circa 1880. If you filter for a range of dates Between 1890 and 1900, you will get the tag with the circa date, but not the one with the say date. The reason for this is that the circa 1880 date will be included in any filter that includes dates for 20 years in both directions, or, in this example, between 1860 and 1900. (If you have changed the 20 year condition in Current Project Options: Advanced, then the number of years you specified there will be used in place of 20.)

Focus Groups

A focus group is a collection of individuals that may be used to specify Subjects when searching the web and for other purposes such as export. Once a Focus Group has been set, the window does not have to stay open for the Focus Group to remain current. You can also save Focus Groups for later use.
 
To display the Focus Group window:
Select Window > Focus Group.
or
Click on the Focus Group button  on the Layout Toolbar. 

 Sort By
You can sort the Focus Group in three ways. By:
Surname
Given name
ID Number
 
To change the sort order:
Click on the down arrow in the Sort by box and select the sort order.
 
Origin of Current Group
The origins of the current group, for example, "Imported from ..." is displayed at the top of the window.
 
Number of Members in Group
The number of members in the Focus Group is displayed near the top of the window on the right side. The number of members selected is also displayed here.

To add a member to a Focus Group:

1. In the Project Explorer, select the persons to be added to the Focus Group. More than one individual can be selected by clicking on the first person, then holding down the <Ctrl> key to click on later selections; or by clicking on the first person, then holding down the <Shift> key and clicking on the last person.
2. Right-click on the Project Explorer and select Add selected names to Focus Group. The selected name or names will be added to the current Focus Group. You can also select Add all names to Focus Group to add all of the names currently in the Project Explorer to the Focus Group.

or
In the Tag Entry Screen, Children window, or Siblings window, right-click on a name and select Add this person to the focus group.
or
1. Select Window > Focus Groups
2. Click on [Add Individual] to add the first member to the focus group.

The Add new member to focus group screen will appear.
 
To add others to the Focus Group:

Once at least one member has been added to the focus group, you may also choose to add his or her Ancestors, Descendants, Spouses, and Name Variations by checking the corresponding fields in the Focus groups window. The number of generations of Ancestors and/or Descendants to include can also be specified. 

1. Click on an name. Hold <Ctrl> and click if you wish to highlight more than one person. You can select contiguous names by clicking on the first name, holding down <Shift> and clicking on the last name.

2. Once you have made your selections, check the items you want to add:

·	Ancestors
·	Descendants
·	Spouses
·	Name variations

3. Click [Add Others].

NOTE: To select all members of the focus group, click [Select All].

CAUTION: Checking Descendants and Spouses will give you the descendants and spouses of the current members of the Focus Group. It will not include the spouses of those descendants. If you want to include their spouses, make a second pass after the descendants have been added and check Spouses on that pass.

Removing Members from a Focus Group

To delete all members of a focus group:

	Click on [Remove All].

To delete one member or several members of a focus group:

	Highlight the name of the member(s) and click on [Remove Selected]. 

Exporting and Importing Focus Groups

To export a focus group for later recall:

Click on [Export].

The Export group window will appear.

To load a saved focus group:

Click on [Import].

The Import group window will appear.

Search the Web

When you are finished working with Focus Groups, click [Close]. If you plan to use a focus group to Search the Web, leave that group selected.
 
Copy Selected Persons

You can also use the Focus Group to copy selected individuals to another data set.

To copy the Focus Group:

1. Select individuals for a Focus Group, either by loading a previously saved Focus Group or by creating a new one.

2. Select Add > Copy Person.

3. In the Copy Person window click on Copy the people in the current Focus Group.

4. Select the data set that you want the Focus Group to be copied to.

5. Click [OK].

Lookup Copy Person

Right-click Menu

From the Focus Group window, you can right-click on any person in the list and:

•	·	Change the Subject in the Details window to the highlighted focus person.
•	·	Change the Subject, as above, and close the Focus Group window.
•	·	Turn on/off or define an Accent.
•	·	Do a Web Search.
•	·	Go to Preferences to make changes.
•	·	Select context-sensitive Help.