We will be building and running filters on the people category. Just to make sure everyone knows where to find it, here's our old friend the upper left corner.
|Upper Left Corner|
In the center of the screen, you'll see your people! The panel on the right hand side is where the magic will begin.
When building and executing filters we don't want to monkey with anything above the custom filter box. That would search on the results of our filtered tree, so what we see would not necessarily be be what we have. All very confusing. Best to avoid the matter altogether.
To begin to build a filter, click on the pencil image next to the custom filter box, as seen above. This brings up the define filter window.
Give your filter a name and click the '+' to start adding rules to the filter.
|Add rule to filter|
Clicking '+' brings up the add rule window. Just look at all those beautiful rules. Click on a few of those filter categories and you'll see the tremendous variety of rules provided. Despair not! We'll be using only a very few of the available rules. (Incidentally, I've done some interesting things with filters. I built a moderately complex filter that identified [usually] distant cousins who got married. Found out my paternal grandparents were 10th cousins.)
You'll Always Remember Your First Filter
I'll be using a simple example to demonstrate setting up the rules in a filter and generating the filtered result. We are going to select one persons parents and grandparents. We'll expand that to include aunts and uncles and such shortly, but first we're looking at a case requiring a single filter (rather than two).
For the example I'll be selecting for my 2nd great-grandfather Lewis Leonard Ebaugh's immediate ancestors.
The rule that accomplishes the task at hand is located under "Ancestral Filters," and has the mouthful of a name "Ancestors of <persons> not more than <N> generations away."
|Ancestors not more than N generations away|
Straight off the top, the "description" is terrible. What this rule does is match a person and ancestors in the pedigree of that person (often termed direct ancestors) less than a given number of generations away.
We use the chooser to select our person of interest. Click "'Select ..." and the "Select Person" window appears.
We can just start typing the surname of our person of interest and then scroll to select them. If they don't have a surname, the given name works.
Click OK, and enter '3' for Number of generations.
|The rule filled out|
|The filter defined|
I named the filter "lew<3" for "Lewis' ancestors less than three generations away," but I think of it as "lew love," on account of the heart (<3) in it.
Our filter is done now! Click 'OK' to accept it, and find find. The 'find' button. On the bottom of the filter panel. Locate it.
|Lower right corner|
Hey, look! Lew love! Before we push that button, take a peek at the lower right hand corner. There is a count of people in the view.
|Person count before filter|
Push it now. BAM!
|Person count after filter|
Seven people, just like we wanted it to be.
Exporting The Results
All the results of all the filters in the world would be useless without the ability to export them into a new GEDCOM. In the upper left corner click on 'Family Trees,' and choose 'Export ...' from the menu that drops down. This brings us to an informational screen with the picture of an old-timey guy. The next screen provides the choice of a number of output formats.
|Output format screen|
We want GEDCOM, of course. On the next screen we choose export options.
On this screen we let GRAMPS know exactly what we want exported. Looking at it from the top:
Privacy Filter: If you have private people in your tree, set this to keep them out of your new GEDCOM.
Living Filter: There are four options: Include all selected people, Replace given names of living people, Replace given names of living people, and Do not include living people.
Person filter: This is where we pick the filter we just built. In this case, lew love.
Note Filter: Ignore it.
Reference Filter: This MUST be set to 'Do not include records not linked to a selected person.' Or else it's bad.
Once all the options are set, click 'Calculate Previews.'
|Export options filter applied|
See how the people included in our exported GEDCOM fell from 1,936 to 7? Again, seven people, just like we wanted it to be. Hit next, pick a name for our file, next, apply, and we are done!
One Filter, Many Rules
As the title of this section implies, filters can contain multiple rules. Each filter works independently on the entire tree, and our results reflect either all rules being true or at least one being true. ('Exactly one rule is also an optiom, though I have no idea why.) For example, if rule 1 was 'people with the surname McDougal' and rule 2 was 'female people', then 'at least one rule must be true' would return all people named McDougal regardless of gender and all females regardless of surname. Choosing 'all rules must be true' would return only females named McDougal.
For our example we will add a rule that prevents the filter from returning Lewis himself as part of the result. Make sure your looking at 'People' again, Just to remind us what the bottom of the filter panel looks like, a familiar screenshot:
|Bottom of the filter panel|
If the name of the filter you just created isn't on the 'Custom filter' button, click the down arrow on the button and choose it. Now when you click the pencil it will open that filter for editing. Add the 'Ancestors of a person at least <N> generations away' rule, found in 'Ancestral filters.' Pick the same person as in the first rule, and 1 for number of generations. Make sure 'All rules must apply' is showing.
|Two rule filter|
Click OK, Click Find, appreciate a job well done.
Filtering The Filtered
So far we've dealt with filters that work on the entire tree. Even if we use multiple filters, each filter works independently on the entire tree. They do not interact. That is, unless we use multi-stage filters. There are rules that take the output of a filter as input, rather than the entire tree. We'll be feeding the results of the filter we just built into a new filter in the example that follows.
Click 'Reset" to clear the custom filter box, then click that pencil to begin building a new filter. The first thing we'll do is set it to 'At least one rule must apply.' If we don't, we might forget, say 90% of the time, and then our filter won't work. That would be powerfully frustrating, I'd think.
Now that we've done that and (hypothetically) saved us hours of frustration, it's time to pick our rule. We want 'Siblings of <filter> match,' which is located under Family filters. Pick the filter we just made. (For me, lew<3, AKA lewlove).
|Siblings filter rule|
Click 'OK.' We're not quite done yet, though! If we ran the filter as is we'd get all Lewis' aunts, uncles, grandaunts, and granduncles but ONLY those relatives. We need to explicitly bring the people from our original filter back in, with the 'People matching the <filter>' rule, found in General filters. Add the rule, give the filter a name (perhaps a parody pop cultural reference that "the kids" won't get).
|Lew Love 2: Genealogic Boogaloo|
Running the filter we get 22 people, just like we always wanted. Well, like I wanted, because I know Lewis had 2 uncles, 9 aunts, 3 granduncles and 2 grandaunts, which with the 6 from our first filter makes 22.
- Login to request to the join the Trusted List so that you can edit and add images.
- Private Messages: Send a private message to the Profile Manager. (Best when privacy is an issue.)
- Public Comments: Login to post. (Best for messages specifically directed to those editing this profile. Limit 20 per day.)
- Public Q&A: These will appear above and in the Genealogist-to-Genealogist (G2G) Forum. (Best for anything directed to the wider genealogy community.)