Multi-part filter question

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Multi-part filter question

Ron Johnson
Hi,

v4.2.5 on Linux.

I want to create a filter to return people:
1) with a Birth event, and
2) not a Death event, but
3) who are less than 125 years old.

(Purpose being to replace the names of only those people who are actually alive.)

Thus, I created these filters:
  <filter name="People with Birth" function="and">
    <rule class="HasEvent" use_regex="False">
      <arg value="Birth"/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value="0"/>
    </rule>

  <filter name="People without Death" function="and" invert="1">
    <rule class="HasEvent" use_regex="False">
      <arg value="Death"/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value="0"/>
    </rule>

  <filter name="Birth but not Death (125yo)" function="and">
    <rule class="MatchesFilter" use_regex="False">
      <arg value="People without Death"/>
    </rule>
    <rule class="MatchesFilter" use_regex="False">
      <arg value="People with Birth"/>
    </rule>
    <rule class="HasBirth" use_regex="False">
      <arg value="after 1892"/>
      <arg value=""/>
      <arg value=""/>
    </rule>
  </filter>

It seems to work, but doesn't.  For example, my Person object has a Birth event, doesn't have a Death event and was born after 1892.  Yet my Person is not returned by the filter.

What am I doing wrong?

Thanks.

-- 
World Peace Through Nuclear Pacification

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Multi-part filter question

Doug-11
On 03/04/17 07:05, Ron Johnson wrote:
Hi,

v4.2.5 on Linux.

I want to create a filter to return people:
1) with a Birth event, and
2) not a Death event, but
3) who are less than 125 years old.

(Purpose being to replace the names of only those people who are actually alive.)

Thus, I created these filters:
  <filter name="People with Birth" function="and">
    <rule class="HasEvent" use_regex="False">
      <arg value="Birth"/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value="0"/>
    </rule>

  <filter name="People without Death" function="and" invert="1">
    <rule class="HasEvent" use_regex="False">
      <arg value="Death"/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value="0"/>
    </rule>

  <filter name="Birth but not Death (125yo)" function="and">
    <rule class="MatchesFilter" use_regex="False">
      <arg value="People without Death"/>
    </rule>
    <rule class="MatchesFilter" use_regex="False">
      <arg value="People with Birth"/>
    </rule>
    <rule class="HasBirth" use_regex="False">
      <arg value="after 1892"/>
      <arg value=""/>
      <arg value=""/>
    </rule>
  </filter>

It seems to work, but doesn't.  For example, my Person object has a Birth event, doesn't have a Death event and was born after 1892.  Yet my Person is not returned by the filter.

What am I doing wrong?

Thanks.
I'm not sure, but isn't there a redundant step?

Wouldn't a single filter:
People with the <birth data>:: Date:= "after 1892"
People without a known death date
All rules must apply

do it?

Doug

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Multi-part filter question

Ron Johnson
In reply to this post by Ron Johnson
On 04/03/2017 07:14 AM, Doug wrote:
On 03/04/17 07:05, Ron Johnson wrote:
Hi,

v4.2.5 on Linux.

I want to create a filter to return people:
1) with a Birth event, and
2) not a Death event, but
3) who are less than 125 years old.

(Purpose being to replace the names of only those people who are actually alive.)

Thus, I created these filters:
  <filter name="People with Birth" function="and">
    <rule class="HasEvent" use_regex="False">
      <arg value="Birth"/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value="0"/>
    </rule>

  <filter name="People without Death" function="and" invert="1">
    <rule class="HasEvent" use_regex="False">
      <arg value="Death"/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value="0"/>
    </rule>

  <filter name="Birth but not Death (125yo)" function="and">
    <rule class="MatchesFilter" use_regex="False">
      <arg value="People without Death"/>
    </rule>
    <rule class="MatchesFilter" use_regex="False">
      <arg value="People with Birth"/>
    </rule>
    <rule class="HasBirth" use_regex="False">
      <arg value="after 1892"/>
      <arg value=""/>
      <arg value=""/>
    </rule>
  </filter>

It seems to work, but doesn't.  For example, my Person object has a Birth event, doesn't have a Death event and was born after 1892.  Yet my Person is not returned by the filter.

What am I doing wrong?

Thanks.
I'm not sure, but isn't there a redundant step?

Wouldn't a single filter:
People with the <birth data>:: Date:= "after 1892"
People without a known death date
All rules must apply

Interesting idea.

But that still doesn't explain why my filter does not work.


-- 
World Peace Through Nuclear Pacification

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Multi-part filter question

Ron Johnson
In reply to this post by Ron Johnson
On 04/03/2017 07:14 AM, Doug wrote:
[snip]

People without a known death date

I don't want people with a Death event that doesn't have a date.  Just those without a Death Event.

-- 
World Peace Through Nuclear Pacification

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Multi-part filter question

Ron Johnson
In reply to this post by Ron Johnson
On 04/03/2017 12:05 AM, Ron Johnson wrote:
Hi,

v4.2.5 on Linux.

I want to create a filter to return people:
1) with a Birth event, and
2) not a Death event, but
3) who are less than 125 years old.

(Purpose being to replace the names of only those people who are actually alive.)

Thus, I created these filters:
  <filter name="People with Birth" function="and">
    <rule class="HasEvent" use_regex="False">
      <arg value="Birth"/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value="0"/>
    </rule>

  <filter name="People without Death" function="and" invert="1">
    <rule class="HasEvent" use_regex="False">
      <arg value="Death"/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value="0"/>
    </rule>

  <filter name="Birth but not Death (125yo)" function="and">
    <rule class="MatchesFilter" use_regex="False">
      <arg value="People without Death"/>
    </rule>
    <rule class="MatchesFilter" use_regex="False">
      <arg value="People with Birth"/>
    </rule>
    <rule class="HasBirth" use_regex="False">
      <arg value="after 1892"/>
      <arg value=""/>
      <arg value=""/>
    </rule>
  </filter>

It seems to work, but doesn't.  For example, my Person object has a Birth event, doesn't have a Death event and was born after 1892.  Yet my Person is not returned by the filter.

What am I doing wrong?

I wonder if the problem is that "after" is using the configured date ranges.  (Some birth dates are "about".)

-- 
World Peace Through Nuclear Pacification

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Multi-part filter question

Hans Ulrich Frink-2
This works for me:

Filter A:
People with personal event birth and Date between 1892 and 2017, main person ="1"
only data that DONT match selection

Filter B:
People with personal event death, main person ="1"

Filter C:
People matching Filter A and B


Cheers
Uli

2017-04-03 15:37 GMT+02:00 Ron Johnson <[hidden email]>:
On 04/03/2017 12:05 AM, Ron Johnson wrote:
Hi,

v4.2.5 on Linux.

I want to create a filter to return people:
1) with a Birth event, and
2) not a Death event, but
3) who are less than 125 years old.

(Purpose being to replace the names of only those people who are actually alive.)

Thus, I created these filters:
  <filter name="People with Birth" function="and">
    <rule class="HasEvent" use_regex="False">
      <arg value="Birth"/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value="0"/>
    </rule>

  <filter name="People without Death" function="and" invert="1">
    <rule class="HasEvent" use_regex="False">
      <arg value="Death"/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value="0"/>
    </rule>

  <filter name="Birth but not Death (125yo)" function="and">
    <rule class="MatchesFilter" use_regex="False">
      <arg value="People without Death"/>
    </rule>
    <rule class="MatchesFilter" use_regex="False">
      <arg value="People with Birth"/>
    </rule>
    <rule class="HasBirth" use_regex="False">
      <arg value="after 1892"/>
      <arg value=""/>
      <arg value=""/>
    </rule>
  </filter>

It seems to work, but doesn't.  For example, my Person object has a Birth event, doesn't have a Death event and was born after 1892.  Yet my Person is not returned by the filter.

What am I doing wrong?

I wonder if the problem is that "after" is using the configured date ranges.  (Some birth dates are "about".)

-- 
World Peace Through Nuclear Pacification

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Multi-part filter question

Doug-11
In reply to this post by Ron Johnson
On 03/04/17 07:05, Ron Johnson wrote:
Hi,

v4.2.5 on Linux.

I want to create a filter to return people:
1) with a Birth event, and
2) not a Death event, but
3) who are less than 125 years old.

(Purpose being to replace the names of only those people who are actually alive.)

Thus, I created these filters:
  <filter name="People with Birth" function="and">
    <rule class="HasEvent" use_regex="False">
      <arg value="Birth"/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value="0"/>
    </rule>

  <filter name="People without Death" function="and" invert="1">
    <rule class="HasEvent" use_regex="False">
      <arg value="Death"/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value=""/>
      <arg value="0"/>
    </rule>

  <filter name="Birth but not Death (125yo)" function="and">
    <rule class="MatchesFilter" use_regex="False">
      <arg value="People without Death"/>
    </rule>
    <rule class="MatchesFilter" use_regex="False">
      <arg value="People with Birth"/>
    </rule>
    <rule class="HasBirth" use_regex="False">
      <arg value="after 1892"/>
      <arg value=""/>
      <arg value=""/>
    </rule>
  </filter>

It seems to work, but doesn't.  For example, my Person object has a Birth event, doesn't have a Death event and was born after 1892.  Yet my Person is not returned by the filter.

What am I doing wrong?

Thanks
Ron,
I haven't reproduced your filter exactly, but I created a filter set:
A: People wiithout a known birth date:: return values that do not apply
B: People without a known death date
C: people matching filter 'A' AND people matching filter 'B'
and as a preliminary ran C just to check that step was working, expecting a series of blanks in the death column.
In fact there were some entries in the death column. On checking I found this was because the event had been recorded as a Burial rather than a Death.

I wonder whether some similar ambiguity between the filter rules and person display could be contributing to your problem.

Doug

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Multi-part filter question

Doug-11
In reply to this post by Ron Johnson
On 03/04/17 15:21, Ron Johnson wrote:
On 04/03/2017 07:14 AM, Doug wrote:
[snip]

People without a known death date

I don't want people with a Death event that doesn't have a date.  Just those without a Death Event.

Does one record a death without at least some indication of when? I don't know; however, it looks as though you can be buried without ever having died - see my last post: spooky!

Doug

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Multi-part filter question

Ron Johnson
In reply to this post by Ron Johnson
On 04/04/2017 08:40 AM, Doug wrote:
On 03/04/17 15:21, Ron Johnson wrote:
On 04/03/2017 07:14 AM, Doug wrote:
[snip]

People without a known death date

I don't want people with a Death event that doesn't have a date.  Just those without a Death Event.

Does one record a death without at least some indication of when? I don't know;

The time span might be too wide for reasonableness.  Also, it's useful for getting around ancestry.com's 125 year "living" rule.

however, it looks as though you can be buried without ever having died - see my last post: spooky!

Doug


-- 
World Peace Through Nuclear Pacification

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org