Changes

Jump to: navigation, search

Example filters

2,570 bytes added, 11:17, 7 January 2021
3-stage FILTERS: add Example 6
==Introduction==
For more info, see [[Filter]] and also [[Gramps_4.2_Wiki_Manual_Gramps_{{man version}}_Wiki_Manual_-_Filters|the wiki manual on Filters]].When creating custom filters, always make sure you have the [[Gramps_{{man version}}_Wiki_Manual_-_Gramplets#Filter|Filter Gramplet]] in the [[Gramps_{{man version}}_Wiki_Manual_-_Main_Window#Bottombar_and_Sidebar|sidebar ]] visible so you can test them before use: either click on . This allows testing the Filter tab filter on real data before putting the right, or click on filter in general use. Test each filter individually... don'Add t set up a Gramplet' and select 'Filter'2nd stage filter until the 1st stage has been tested. To test: in the Filter tab of the sidebar, select the custom filter you made; then click the {{man button|Find}} button.
You create '''Create a custom filter by taking with the following steps: ''' <!--* {{man button| {{icon|stock_add}}}}&nbsp;{{man tooltip|Add a new filter}}:shows the {{man label|Define filter}} dialog and adds a new (as yet unnamed) custom filter framework.* {{man button| {{icon|stock_edit}}}}&nbsp;{{man tooltip|Edit the selected filter}}:opens the {{man label|Define filter}} dialog and loads your existing custom filter for editing.* {{man button|Clone}}&nbsp;{{man tooltip|Clone the selected filter}}:makes an exact copy of the selected filter* {{man button|Test}}&nbsp;{{man tooltip|Test the selected filter}}:brings up the {{man label|Filter Test}} results dialog containing a list of matches following a successful test. If the filter test is invalid, an error may be shown instead.* {{man button| {{icon|stock_remove}}}}&nbsp;{{man tooltip|Delete the selected filter}}::removes the selected filter from the Gramps collection of custom filters.{{-}}-->* Click on {{man menu|Edit}} in the menu bar to display the drop-down list: The last item is the {{man menu|____ Filter Editor}} and it is contextual, changing the filter editor to only show filters for the category of the current View* Click on the {{man menu|Filter Editor}}* Click on {{man label|Filter Editor}} {{man button| {{icon|stock_add}}}}&nbsp;{{man tooltip|Add a new filter}} to start creating a new filter* Give your filter a unique '''name'''* Click on {{man label|Define Filter : Rule List}} {{man button| {{icon|stock_add}}}}&nbsp;{{man tooltip|Add another rule to the filter}} to see the filter rules ([[Gramps_{{man version}}_Wiki_Manual_-_Filters#Which_filters_in_which_Category.3F|limited to those available in the current View]])* Select an appropriate filtering '''rule'''
Click on '''Editor''' in the top bar to display the drop-down list The last item is the '''Filter Editor''' for your current View Click on the '''Filter Editor''' Click on ''''+'''' to start creating a new filter Give your filter a '''name''' Click on ''''+'''' to see the filter * Add further rules available to you in your current View Select an appropriate '''rule'''as needed
Add further * Select the appropriate {{man label|Define Filter : Options}} pop-up menu item to define how the rules as needed  Set the necessary interact. '''Option'The [[man menu|All rules must apply}} option is selected by default.''This is only necessary when there are multiple rules. '''* Click on the {{man label|Define Filter}} {{man button| OK'''}} '''* Click on the {{man label|Filter Editor}} {{man button| Close}} ''' ''[Note that new custom filters (or changes ) only take effect after Closing closing the Filters window]Filter Editor.''
There are rules to allow you to use filters defined for another View. In this way you can build up complex filtering involving several Views.
{{man notewarn|NoteCustom Filters are resource hungry|That very Very large databases may encounter resource limitations when handling some complex filters}}
{{man warn|Bugnotes1|A bug in 4.1.3 interferes with filter creation. The bug report ( {{bug|8643}} ) provides a patch to correct it}}
 
{{man warn|Bugnotes2|A bug in gramps 4.0 - 4.1 prevents custom filters working with Notes. There is a patch in bug report {{bug|7595}}. Recent versions of 4.2 work correctly}}
----
''
=== Example 6. People with a common ancestor with <person>, their spouses and their spouse's children ===
'''''Person Filter Editor'''''
'''''Filter A:'''''
Ancestral filters =>
People with a common ancestor with <person>
'''All rules must apply'''
 
'''''Filter B:'''''
Family filters =>
Spouses of <filter> match: Filter name:="A"
'''All rules must apply'''
 
'''''Filter C:'''''
Family filters =>
Children of <filter> match: Filter name:="B"
General filters =>
People matching the <filter>: Filter name:="A"
General filters =>
People matching the <filter>: Filter name:="B"
'''At least one rule must apply'''
----<Run Filter C> in Person View
=='''''4----stage FILTERS'''''==
----
== '''''5-stage FILTERS''''' ==
'''''Place Filter Editor'''''
 
''Comment: previous Filter A written for gramps 4.1 does not work in gramps 5 with the new Place hierarchy. It needs to be replaced by new
'''''Filter A:'''''
General filters=>
Places matching parametersenclosed by another place: Name:= "Illinois"; Place type:= "State" Inclusive:="1" [NOTE "Include selected Gramps ID" - this is important or the filter excludes events where "Illinois" is the first part of the place address title]
'''All rules must apply'''
 
'''All rules must apply'''
 
 
 
'''''Person Filter Editor'''''
'''''Filter C:'''''
General filters=> People with events matching the <event filter>: event filter name:= "B"
Event filters=>
People with the personal <event>: Personal event:="Residence"
Event filters=>
People with the personal <event>: Personal event:="Death"
Event filters=>
People with the personal <event>: Personal event:="Birth"
 
'''**At least one rule must apply**'''
'''All rules must apply'''
'''''Filter D:'''''
General filters=>
People with events matching the <event filter>: event filter Filter name:= "B" Event filters=> People with the personal <event>: Personal event:="Death" '''All rules must apply'''  '''''Filter E:'''''
General filters=>
People matching the <filter>: Filter name:= "C"
General filters=>
People with a name matching the <filtertext>: Filter nameText:= "DDoe"
'''**At least one rule All rules must apply**'''
'''<Run Filter ED> in Person View.'''
----
{{languages|Example filters}}
[[Category:Gramps Examples]]
[[Category:Filters]]
86
edits

Navigation menu