create_filter
Save a reusable custom filter from Gramps rules so repeated selections get a name and can be applied again without retyping rules each time.
Instructions
Save a reusable custom filter built from Gramps' own rules.
Worth doing for a selection you will run repeatedly — an audit scope, a branch of the tree — because the filter then has a name rather than being retyped each time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Filter name, used to apply it later. | |
| rules | Yes | Rules, each {'name': <rule>, 'values': [...], 'regex': false}. Rule names come from list_filter_rules. | |
| invert | No | Return everything the rules do NOT match. | |
| comment | No | Note on the filter's purpose. | |
| function | No | How rules combine: 'and', 'or', or 'one'. | and |
| namespace | Yes | Singular, capitalised: Person, Family, Event, Place, Citation, Source, Repository, Media, Note. |