# Filter on empty field

**URL:** <https://gramps.discourse.group/t/filter-on-empty-field/6487>\
**Category:** Help\
**Created:** [November 23, 2024, 8:42pm UTC](https://gramps.discourse.group/t/filter-on-empty-field/6487 "2024-11-23T20:42:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![roptat](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@roptat](https://gramps.discourse.group/u/roptat)\
**Post date:** [November 23, 2024, 8:42pm UTC](https://gramps.discourse.group/t/filter-on-empty-field/6487/1 "2024-11-23T20:42:01Z")

</div>

Hi, I’m using Gramps 5.2.3 on Linux. I’m trying to keep track of things to do in my research using filters to find things I can improve.

How could I create a filter to find events that have an empty date or place?

---

<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:** [November 23, 2024, 9:10pm UTC](https://gramps.discourse.group/t/filter-on-empty-field/6487/2 "2024-11-23T21:10:52Z")

</div>

It all depends on which empty field you’re seeking.

If there is a view that has that field as a column (or as a `View -> Configure...` column that you can enable), then sorting on that column is the easiest approach. (The 1st column is the default sort column. Click on other column headers to sort on it. Click a 2nd time to reverse the sort order.)

For other fields, create a Custom Filter with a rule (for that field) which finds ANY data in that field using the [Regular Expressions](https://www.gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Filters#Regular_Expressions) option. Then select the “Return values that do not match the filter rules” option in the Define filter dialog.

In the following “Events matching parameters” rule, the “Description” has a dot/decimal point/period with “Use regular expressions” selected. That means find any Event with a description.

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

Then the Custom Filter definition is where the “Return values that do not match the filter rules” option is selected.

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

---

<div class="post-metadata">

**Author:** ![roptat](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@roptat](https://gramps.discourse.group/u/roptat)\
**Post date:** [November 24, 2024, 6:33am UTC](https://gramps.discourse.group/t/filter-on-empty-field/6487/3 "2024-11-24T06:33:36Z")

</div>

It works well with description, but not with date nor place… I’m trying to compose this with different filters, so I cannot simply sort a column.

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [November 24, 2024, 12:37pm UTC](https://gramps.discourse.group/t/filter-on-empty-field/6487/4 "2024-11-24T12:37:33Z")

</div>

> [@roptat](#):
>
> but not with date

There is an addon filter rule to find events with date information that Gramps does not recognize as valid. The dates that display as bold italic. **HasInValidDate**

There is its sister addon rule **HasValidDate**

In the Events View, create three custom filters.

Filter 1:  
`Events filters > HasInValidDate`  
“Return values that do not match the filter rules” option checked

Filter 2:  
`Events filters > HasValidDate`  
“Return values that do not match the filter rules” option checked

Filter 3  
`General filters > Events matching the <filter>` select Filter 1  
`General filters > Events matching the <filter>` select Filter 2  
Make sure that the option is that all rules must apply

Running Filter 3 returns events with blank date fields.

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [November 24, 2024, 12:58pm UTC](https://gramps.discourse.group/t/filter-on-empty-field/6487/5 "2024-11-24T12:58:42Z")

</div>

> [@roptat](#):
>
> nor place

In the Events View, create the custom filter:

`Event filters > Events matching parameters`  
Using the “Use regular expression” option put the dot (`.`) in the Place field and then check the “Return values that do not match the filter rules” option.

These filters are created in the Events view. To find the People with these events create the filter in the People view:

`Events filters > People with events matching <event 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:** [November 24, 2024, 1:19pm UTC](https://gramps.discourse.group/t/filter-on-empty-field/6487/6 "2024-11-24T13:19:51Z")

</div>

As a shortcut to finding the appropriate rule, consider using the [Filter+](https://www.gramps-project.org/wiki/index.php/Addon:Isotammi_addons#Filter.2B) addon gramplet from the Isotammi project.

After putting a period/dot into the **Filter+** field and selecting “ **Use regular expressions** ”, the Find will find any record with data in that field.

Since you want the opposite (any record _ **without** _ data in the field) and the Filter+ gramplet cannot invert easily, convert the parameters to a cutom filter with the Define filter button. Then use the **define custom filter** ’s option to “ **Return values that do not match filter rules** ”

Difference between a built-in **Filter** gramplet and the **Filter+** gramplet in the Families category views:

 ![](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/8/8c6905710305c2a055cb5c4b1e4ccd1e5113aec3.png)  
 ![](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/d/d0ebe9aa98eea594bc5171e617ab1bc14222ab4c.png)

---

<div class="post-metadata">

**Author:** ![Davesellers](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesellers/32/1457_2.png) [@Davesellers](https://gramps.discourse.group/u/Davesellers)\
**Post date:** [November 24, 2024, 6:51pm UTC](https://gramps.discourse.group/t/filter-on-empty-field/6487/7 "2024-11-24T18:51:01Z")

</div>

Please refresh my memory on how to get the Filter+ installed. I lost it when I moved to 5.2.3 and I don’t see it using the add on manager.

---

<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:** [November 24, 2024, 7:07pm UTC](https://gramps.discourse.group/t/filter-on-empty-field/6487/8 "2024-11-24T19:07:53Z")

</div>

> [@Davesellers](#):
>
> Please refresh my memory on how to get the Filter+ installed

See the instructions at:  
[https://www.gramps-project.org/wiki/index.php/Addon:Isotammi\_addons#Installation](https://www.gramps-project.org/wiki/index.php/Addon:Isotammi_addons#Installation)

The key points are:

1. Adding the Isotammi Project to the list in the [Addon Manager](https://gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Navigation#Using_the_Addon_Manager)’s Projects tab.
2. Selecting that added project.
3. Changing the Audience Filter from “Everyone” to “Expert”. (All Isotammi plugins are “Expert” level tools.)

 ![](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/d/dd04e94e5b04660d6edbdbabb353ab2379ac5e73.png)  
 ![](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/b/bc7560972b6e9b2e88a6222a851360966a91d3a5.png)

---

<div class="post-metadata">

**Author:** ![Davesellers](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesellers/32/1457_2.png) [@Davesellers](https://gramps.discourse.group/u/Davesellers)\
**Post date:** [November 25, 2024, 9:22pm UTC](https://gramps.discourse.group/t/filter-on-empty-field/6487/9 "2024-11-25T21:22:06Z")

</div>

I checked and that is what I have.  
I see that there is a Generic People Filter and I assume that is the Filter+, however in the Add Grampet menu there is nothing that represents such a 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:** [November 25, 2024, 9:27pm UTC](https://gramps.discourse.group/t/filter-on-empty-field/6487/10 "2024-11-25T21:27:57Z")

</div>

Those generic filters are what SuperTool uses for coded filters rather than Rules.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [December 25, 2024, 9:28pm UTC](https://gramps.discourse.group/t/filter-on-empty-field/6487/11 "2024-12-25T21:28:20Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
