# Filter out people for exports and reports

**URL:** <https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067>\
**Category:** Help\
**Tags:** regular-expression, custom-filters\
**Created:** [February 21, 2025, 4:55pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067 "2025-02-21T16:55:09Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![vlayne](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vlayne](https://gramps.discourse.group/u/vlayne)\
**Post date:** [February 21, 2025, 4:55pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/1 "2025-02-21T16:55:09Z")

</div>

Old topic, but perhaps there’s an update.

I have an extensive ancestry list. (It’s huge!) To ensure I have reached a dead end with each branch and leaf, I close off each one with an additional entry for both parents: SURNAME = x (example, Fred Charlemagne, father: surname = x, mother: surname = x). Exporting this to a relational graph report, I can’t find a way to filter out these dead ends by SURNAME or any other method.

Using GrampsAOI64 2.5.4

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [February 21, 2025, 5:08pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/2 "2025-02-21T17:08:16Z")

</div>

Set all these “x” surname persons to be Private.  
[Make a backup](https://www.gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Manage_Family_Trees#Backing_up_a_Family_Tree) before doing mass changes

You can do this with the [Set Privacy](https://gramps-project.org/wiki/index.php/Addon:SetPrivacyTool) tool with a Name Filter (using [Regular Expressions](https://www.gramps-project.org/wiki/index.php/Gramps_Glossary#regex) parameters for exact matches, not pattern matches)

You can also use one of the sample **Privacy** [SuperTool scripts](https://gramps-project.org/wiki/index.php/Addon:Isotammi_addons#SuperTool_Scripts) to update the Privacy of selected objects.

Your exports and Reports have a GUI option to exclude Private persons. So you won’t have to backtrack to write a custom filter.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [February 21, 2025, 5:27pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/3 "2025-02-21T17:27:53Z")

</div>

> [@emyoulation](#):
>
> Name Filter (using [Regular Expressions](https://www.gramps-project.org/wiki/index.php/Gramps_Glossary#regex) parameters for exact matches, not pattern matches)

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/2/22f403663cdfed81f2f8c66472f1eae0fdf8ba3f.png)

select the `Use regular expression` to exactly match “x” or “X” `(?<![\w])x(?![\w])`  
(select the `Case sensitive` option in the rule to only find the specified “x” in lower case only.)

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/a/a75aaa6b4c30f623be24480848752f81ad6a7b48.png)

---

<div class="post-metadata">

**Author:** ![vlayne](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vlayne](https://gramps.discourse.group/u/vlayne)\
**Post date:** [February 21, 2025, 5:52pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/4 "2025-02-21T17:52:05Z")

</div>

A little confused regard the follow-up images. Are these images coming from the Set Privacy Tool? I just installed the 1.0.16 addon and restarted Gramps. The Privacy Tool window is a dead end! The Person Filter combo box will not progress to any screens or additional filtering. The only options are how far back in years do you want to set privacy to the ENTIRE DATABASE!

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [February 21, 2025, 5:59pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/5 "2025-02-21T17:59:07Z")

</div>

> [@vlayne](#):
>
> the follow-up images. Are these images coming from

These are from the People category **[Custom Filter](https://www.gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Filters#Custom_Filters) editor**  
and the dialog when + adding (via the People category **Edit Rule** dialog) to a custom filter (including how to search for a rule by part of its name and a tooltip showing _some_ **RegEx** operators.)

You can create the _Custom Filter_ with the **Filter Gramplet** , test the filtering resuts in the flat list **People** view, and …if the results are correct… use the _Custom Filter_ with the **Set Privacy** addon tool

---

<div class="post-metadata">

**Author:** ![vlayne](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vlayne](https://gramps.discourse.group/u/vlayne)\
**Post date:** [February 21, 2025, 6:47pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/6 "2025-02-21T18:47:46Z")

</div>

Thank you for clarifying. I got the filter set; however, the Set Privacy Tool’s Person, Event and Media filter combo boxes are set for the entire database and NO other options. So, this addon will set everyone in the entire database to private for **up to** 2000 years if I select Execute

 ![Gramps_SetPrivacyTool](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/9/90fbaaf40507ba2acd709aa9dffe24840439272e.png)  
.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [February 21, 2025, 6:53pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/7 "2025-02-21T18:53:23Z")

</div>

Sometimes Addon plugins do not monitor the Gramps internal “signals” for changes. In this case, the change was that you added a new Custom Filter. But the addon fails to check for new filters added during this session and the tool has an old list in its menus.

The workaround is to quit Gramps and restart it. The new Custom Filter should now appear in the menu.

(Yes, this is a bug. And it should be reported. But the workaround should ‘get you through the night’)

---

<div class="post-metadata">

**Author:** ![vlayne](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vlayne](https://gramps.discourse.group/u/vlayne)\
**Post date:** [February 21, 2025, 6:57pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/8 "2025-02-21T18:57:38Z")

</div>

YEP! That did it! Solved!  
Appreciate the help!

 ![Gramps_SetPrivacyTool2](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/5/53176c3dd68b0f7e839adda6b6b6232410e357f3.png)

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [February 21, 2025, 7:16pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/9 "2025-02-21T19:16:29Z")

</div>

> [@vlayne](#):
>
> Old topic, but perhaps there’s an update.

Where was this topic raised before? (linking it to this answer would close another thread.)

---

<div class="post-metadata">

**Author:** ![vlayne](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vlayne](https://gramps.discourse.group/u/vlayne)\
**Post date:** [February 21, 2025, 7:33pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/10 "2025-02-21T19:33:49Z")

</div>

Well, well, well, well. The filter set a bunch of people to private, but I don’t know who. If I export the whole set using the filter I still get a bunch of x placeholders and a serious cutdown list of actual ancestors. Always [make a backup](https://www.gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Manage_Family_Trees#Backing_up_a_Family_Tree) before making such edits, yeah.

Any idea how I can get a list of everyone marked private? And possibly undo this? I already tried Abandon Changes and Quit.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [February 21, 2025, 7:45pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/11 "2025-02-21T19:45:05Z")

</div>

> [@vlayne](#):
>
> Any idea how I can get a list of everyone marked private? And possibly undo this? I already tried Abandon Changes and Quit.

View → Configure… the flat list view to show the **Last Changed** , **Number of Parents** , and **Private** columns  
Apply and Close the **Configure People - Person View** dialog

Sort on **Last Changed** column with the New at the top. The timestamp tells you which were changed and how recently. The **Number of parents** tells you if they were the right Persons. The **Private** tell you if the Privacy was actually set.

---

<div class="post-metadata">

**Author:** ![vlayne](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vlayne](https://gramps.discourse.group/u/vlayne)\
**Post date:** [February 21, 2025, 8:28pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/12 "2025-02-21T20:28:33Z")

</div>

OK. No one was marked private. And a correction, all ancestors are there in the export.

Backed up data set. Going to try the Set Privacy Tool again. This time not supplying years to check because the x placeholders do not have dates.

---

<div class="post-metadata">

**Author:** ![vlayne](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vlayne](https://gramps.discourse.group/u/vlayne)\
**Post date:** [February 21, 2025, 8:34pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/13 "2025-02-21T20:34:00Z")

</div>

AAAAAND results this time! X placeholders were marked private!

 ![Gramps_SetPrivacyTool4](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/4/4b5b163d987c3ae68937f5a96b879000e6fae926.png)  
 ![Gramps_SetPrivacyTool5](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/b/b064fc1cc7885f88fad3ff4f31dc3b1d36ab40c1.png)

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [February 21, 2025, 8:56pm UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/14 "2025-02-21T20:56:06Z")

</div>

Big Tree. If 22,989 were set to be Private, how many people are in that tree in total ?

Your capture was also in the Grouped People by Name view. That interferes with the **Last Changed** sort. It collapses the other "not named ‘x’ " people who might have been inadvertently set to Private at the same time.

---

<div class="post-metadata">

**Author:** ![vlayne](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vlayne](https://gramps.discourse.group/u/vlayne)\
**Post date:** [February 22, 2025, 12:35am UTC](https://gramps.discourse.group/t/filter-out-people-for-exports-and-reports/7067/15 "2025-02-22T00:35:48Z")

</div>

About 50K in the tree. There are some rabbit trails I later found that were bad but kept them in the DB. But 3 grandparents with super pedigrees in Medieval Europe, though. The number keeps climbing.
