Overview
Filters are used to select people. You add one or more terms to a list, and TMG to GEDCOM applies the terms to each eligible person. If the person's data passes the criteria defined by the filter terms, the person is selected.
At present, the only filter is in the People section and it determines which people are included in the GEDCOM file.
Terms
A filter may include one or more terms. Each term returns true or false; true if the person met the qualifications of the filter, or false if not.
An example of a simple term is Gender which returns true if the person is one of the genders indicated by the choice in the term's pull-down menu. To include females and exclude males, you would add a Gender term and set its property to "Females only".
TMG to GEDCOM also supports complex terms that include their own filters, like the Event Count term. The Event Count term supports filters that are applied to a person's events. So, for example, you can configure an Event Count term to select people who have one or more census events.
Grouping Terms
You may add multiple terms. By default, if you add multiple terms, each term must return true in order for a person to be included in subsequent processing.
You may group terms using the And/Or term. The And/Or term may be set to "All must pass (And)" or "At least one must pass (Or)". The "And" or "Or" logic applies to the terms nested under the group term.
For example, if you want to include people who are either an ancestor of a certain person or a descendant of that person, you would use an And/Or term set to "At least one must pass (Or)":
Each nesting level essentially creates a pair of parentheses. If the "Ancestor of" term is "A" and the "Descendant of" term is "B", the inclusion expression is:
If (A OR B) is true, include the person
You may create complex filtering logic by nesting And/Or terms.
Term Properties
Simple terms have no properties. If you add a simple term to the list, TMG to GEDCOM will not open a window to edit the term; there is nothing to edit.
Some terms do have properties, and if you add one to the list, TMG to GEDCOM will open an "add" window where you can set the properties as desired.
Term Titles
Some terms do not have Title properties. Those terms use a title based on how the term properties are set. So, for example, the Gender property uses the choice from its only property as the title.
Some terms have a Title property that you set yourself. For those terms, it is impractical for TMG to GEDCOM to summarize the intent of the term.
Some terms have a Title property that TMG to GEDCOM will set based on the term's property values, but the Title is editable and you may change it. In those cases, however, changing the property values will reset the Title to the automatic value supplied by TMG to GEDCOM. Edit the Title after you set the other properties.
Term List
Term | Definition |
---|---|
Ancestor Generation | Returns true when the person is an ancestor of the subject person within the range of generations specified by "Min Generation" and "Max Generation". You may also specify whether the spouses of qualified ancestors are included. To include the subject person, the "Min Generation" must be zero. |
Age | Returns true if the person's age passes the conditions described by the term's properties. You specify:
|
Ancestor of Person | Returns true when the person is an ancestor of a given person. You may specify:
|
And/Or | As explained above, the And/Or term is used to group other terms. You may configure the And/Or term such that when it evaluates its child terms, "All must pass (And)" or "At least one must pass (Or)". |
Attribute Text | Returns true when the
Attribute
named in the term properties passes the filter condition described by the term's Text Filter properties.
TMG's flags are converted to Attributes where the Attribute name is the TMG flag's name and the Attribute value is the flag's value. |
Cousin within Generations | Returns true when the person is a descendant of one of the ancestors of the subject person within the generation count you specify.
For example, if you choose yourself as the subject, and set the Generations property to 1, Cousins within Generations will select your parents and their descendents. That includes your siblings, but also includes any grandchildren of your parents, any great-grandchildren, etc. You may also specify whether or not to include spouses of selected cousins. |
Deceased | Returns true when the person is deceased. This term has no properties. |
Descendant Generation | Returns true when the person is a descendant of the subject person within the range of generations specified by "Min Generations" and "Max Generations". You may also specify whether the spouses of qualified descendants are included. To include the subject person, the "Min Generation" must be zero. |
Descendant of Person | Returns true when the person is a descendant of a given person. You may specify:
|
DNA Descendant of Person | Returns true when the person inherits the DNA of a given person. You may specify: |
Event Count | See the Event Count section below. |
Gender | Returns true if the person is one of the genders indicated by the choice in the term's pull-down menu. |
ID Number | Returns true if the person has the ID number indicated in the filter properties. |
Last Edited | Returns true if the person's last edited date (aka changed date) passes the date filter properties. |
Living | Returns true when the person is not deceased. This term has no properties. |
Name Count | See the Name Count section below. |
Primary Birth | Returns true when the person's primary birth event passes the term's Event Filter property. If the person has no primary birth event, this term will return false. |
Primary Death | Returns true when the person's primary death event passes the term's Event Filter property. If the person has no primary death event, this term will return false. |
Primary Image | Filters people based on the presence or absence of a primary image.
Returns true when the person has a primary image exhibit and the Primary Image parameter is set to Has primary image. Returns true when the person does not have a primary image exhibit and the Primary Image parameter is set to Does not have primary image. |
Event Count
The Event Count term filters people based on their events. TMG to GEDCOM counts the events that pass the Event Filter specified in the Event Count window, and compares the actual count to the desired count. There are several comparison operators, and this allows you to filter people based on having, or not having, the specified events.
For example, to select people who have at least one Census event in Massachusetts:
The Event Filter in the example includes two terms, "Tag Place Contains Massachusetts" and "Census Tag Types". The outermost terms in a filter are ANDed together, so both terms must be true for an event to qualify. The first term restricts the events to those with "Massachusetts" in the Place, and the second restricts the events to those with certain Tag Types. The Operator is "greater than" and the Count is zero, so the Event Count term will select people who have at least one census event in Massachusetts.
Editing the "Census Tag Types" term opens this window which shows that several census Tag Types have checkmarks.
Event Filter Terms
Event Filters support the following terms. Event Filters are used as a property of the Event Count term and also by other properties that filter events, such as Tag Sets.
Term | Definition |
---|---|
And/Or | As explained above, the And/Or term is used to group other terms. You may configure the And/Or term such that when it evaluates its child terms, "All must pass (And)" or "At least one must pass (Or)". |
Primary or Non-primary | Returns true when the tag is primary for the person and "Primary only" is selected, or when the tag is not primary for the person and "Non-primary only" is selected. |
Principal or Witness | Returns true when the person is a principal in the event and "Principal only" is selected, or when the person is not a principal in the event and "Witness only" is selected. |
Role | Returns true when the subject's Role name passes the filter condition described by the term's Text Filter properties. |
Subject Age | Returns true if the subject's age passes the conditions described by the term's properties. The age is determined by subtracting the primary birth date from the event date. You specify:
|
Tag Date | Returns true if the tag's date passes the condition described by the term's date filter properties. |
Tag Group | Returns true if the tag's Tag Type Group (Birth, Death, etc.) matches the selected group (when Operator is set to "Equals") or does not match the selected group (when Operator set to "Does not equal"). |
Tag Note | Returns true when the tag's Note text passes the filter condition described by the term's Text Filter properties. |
Tag Participants | Returns true when the number of participants (all participants, principals only, or witnesses only) passes the comparison terms. |
Tag Place | Returns true when the text created by combining all the tag's place records passes the filter condition described by the term's Text Filter properties. |
Tag Place Part | Returns true when a specific part of the place record passes the filter condition described by the term's Text Filter properties. |
Tag Place 1 | Returns true when the tag's Place 1 passes the filter condition described by the term's Text Filter properties.
Use Tag Place or Place 1 for places in TMG projects. |
Tag Place 2 | Returns true when the tag's Place 2 passes the filter condition described by the term's Text Filter properties.
Place 2 is always empty in TMG projects. |
Tag Text | Returns true when the event's Text value passes the filter condition described by the term's Text Filter properties. |
Tag Type | Returns true when the event's Tag Type is one of the selected Tag Types specified in the term's Tag Type filter properties. |
Name Count
The Name Count term filters people based on their names. TMG to GEDCOM counts the names that pass the Name Filter specified in the Name Count window, and compares the actual count to the desired count. There are several comparison operators, and this allows you to filter people based on having, or not having, the specified names.
For example, to select people who have at least one name with the Surname "Smith":
The Name Filter in the example includes the Name Part term, "Surname Equals Smith". The Operator is "greater than" and the Count is zero, so the Name Count term will select people who have at least one name where the surname is Smith.
Name Filter Terms
Name Filters support the following terms. Name Filters are used as a property of the Name Count term and also by other properties that filter names, such as Tag Sets.
Term | Definition |
---|---|
And/Or | As explained above, the And/Or term is used to group other terms. You may configure the And/Or term such that when it evaluates its child terms, "All must pass (And)" or "At least one must pass (Or)". |
Name Part | Returns true when the selected name part matches the filter condition described by the term's Text Filter properties. |
Primary or Non-primary | Returns true when the tag is primary for the person and "Primary only" is selected, or when the tag is not primary for the person and "Non-primary only" is selected. |
Tag Note | Returns true when the tag's Note text matches the filter condition described by the term's Text Filter properties. |
Tag Type | Returns true when the name's Tag Type is one of the selected Tag Types specified in the term's Tag Type filter properties. |
Date Filter Operators
Date Filter terms support the following operators.
In the descriptions below, a regular date is any valid GEDCOM date where TMG to GEDCOM can parse day, month, and year values. You may omit the modifier and you may include all three parts, only month and year, or year only.
In the descriptions below, an irregular date is where TMG to GEDCOM cannot parse a valid GEDCOM date except for the text part.
Operator | Definition |
---|---|
Is empty | Returns true when the date value is empty. You might think of this as "has a date". |
Is not empty | Returns true when the date value is empty. You might think of this as "does not have a date". |
Before | Returns true when the date is before the comparand date (Date 1). |
Equals | Returns true when the date is the same as the comparand date (Date 1).
For regular dates, the comparison includes all the parts of the date (modifier, day, month, and year). For an irregular date (text only), the comparison compares only the text. A regular date will never compare equal to an irregular date. |
Does not equal | Returns true when the date is not the same as the comparand date (Date 1). |
Same month as | Returns true when the date has the same month as the comparand date (Date 1).
You must specify both a month and a year in Date 1 even though only the month matters. |
Same year as | Returns true when the date has the same year as the comparand date (Date 1).
You must specify both a month and a year in the Date 1 even though only the month matters. |
Between | Returns true when the date is between the comparand dates (Date 1 and Date 2), inclusive.
You must specify a regular date in both Date 1 and Date 2, or an irregular date in both Date 1 and Date 2. You cannot mix regular and irregluar dates. Because the comparison is inclusive, "1 JAN 1940" is between 1 JAN 1940 and 2 JAN 1940. Also, "2 JAN 1940" is between 1 JAN 1940 and 2 JAN 1940. A partial date, such as "JAN 1940" is not between 1 JAN 1940 and 31 JAN 1940. The day in "JAN 1940" is zero, and zero is less than 1. |
After | Returns true when the date is after the comparand date (Date 1). |
Within | Returns true when the date is within a certain number of days, weeks, months, or years of the current date, the date when making the GEDCOM file. |
Text Filter Operators
Text Filter terms support the following operators.
Operator | Definition |
---|---|
Equals | Returns true if the target text and the comparand text are equal. Letter case does not matter, so "a" matches "A", for example. |
Does not equal | Returns true if the target text and the comparand text are not equal. Letter case does not matter, so "a" matches "A", for example. |
Empty | Returns true if the target text is empty. |
Not empty | Returns true if the target text is not empty. |
Starts with | Returns true if the target text starts with the comparand text. Letter case does not matter, so "a" matches "A", for example. |
Does not start with | Returns true if the target text does not start with the comparand text. Letter case does not matter, so "a" matches "A", for example. |
Contains | Returns true if the comparand text occurs somewhere in the target text. Letter case does not matter, so "a" matches "A", for example. |
Does not contain | Returns true if the comparand text does not occur somewhere in the target text. Letter case does not matter, so "a" matches "A", for example. |
Matches | Returns true if the target text matches the Regular Expression in the comparand. Regular Expressions in TMG to GEDCOM are always case-insensitive. |
Does not match | Returns true if the target text does not match the Regular Expression in the comparand. Regular Expressions in TMG to GEDCOM are always case-insensitive. |
Ends with | Returns true if the target text ends with the comparand text. Letter case does not matter, so "a" matches "A", for example. |
Does not end with | Returns true if the target text does not end with the comparand text. Letter case does not matter, so "a" matches "A", for example. |