* Common relationships between two people

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
Gary Carson
Famous
Posts: 162
Joined: 02 Mar 2016 17:46
Family Historian: V7
Location: Grand Island, Nebraska, USA

Common relationships between two people

Post by Gary Carson » 22 Mar 2022 19:23

I am trying to develop a query to find only common ancestors between two persons (most specifically myself and my wife).

For example Jane Doe is my 3rd cousin 4 times removed and she is also my wife’s 10th cousin twice removed.

The base query I am using contains the following Row selection criteria:
  • Add if spouse of [“Starting “Person”]. Include original individual
    Add if an ancestor of anyone in the current result set.
    Add if an descendant of anyone in the current result set.
    Add if a spouse of anyone in current result set.


I want to restrict results to only persons that are related to myself and my wife. Could this then create a list of persons related to any two persons.
Gary
Win 10, FH 7.0.15

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Common relationships between two people

Post by tatewise » 22 Mar 2022 20:48

If you are looking for common direct line ancestors then the Rows tab filter needs to implement the following rule:

Add if this person is a direct ancestor of person A and is a direct ancestor of person B

Does that define who you are looking for?

If so then the IsAncestorOf(...) function used twice within =IsTrue( ... and ... ) should work.

However, it hinges on exactly what you mean by Common relationships between two people and only common ancestors which are not identical.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Gary Carson
Famous
Posts: 162
Joined: 02 Mar 2016 17:46
Family Historian: V7
Location: Grand Island, Nebraska, USA

Re: Common relationships between two people

Post by Gary Carson » 22 Mar 2022 21:06

I am looking for a person that is a direct ancestor of person A and is a direct ancestor of person B. Hopefully I format the function you provided correctly.
Gary
Win 10, FH 7.0.15

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Common relationships between two people

Post by tatewise » 22 Mar 2022 21:26

If you get stuck then please ask, but I am of the opinion that a learning experience is worthwhile.

Checkout the Help pages for IsAncestorOf(...) and IsTrue(...)

Note that the first says: Takes 2 Individual records as parameters and returns TRUE if the 1st is the ancestor of the 2nd.

To identify person A and person B use the Record(...) function.
i.e. Record( 2, I ) identifies the Individual record with Record Id = 2
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Gary Carson
Famous
Posts: 162
Joined: 02 Mar 2016 17:46
Family Historian: V7
Location: Grand Island, Nebraska, USA

Re: Common relationships between two people

Post by Gary Carson » 22 Mar 2022 22:08

I agree on the learning experience. The last one you took me on helped.
Gary
Win 10, FH 7.0.15

User avatar
Gary Carson
Famous
Posts: 162
Joined: 02 Mar 2016 17:46
Family Historian: V7
Location: Grand Island, Nebraska, USA

Re: Common relationships between two people

Post by Gary Carson » 23 Mar 2022 00:03

Going back to the base query I am using contains the following Row selection criteria:
Add if spouse of [“Starting Person”]. Include original individual
Add if an ancestor of anyone in the current result set.
Add if an descendant of anyone in the current result set.
Add if a spouse of anyone in current result set.


The desired result is only indicated by the sample below:

Picture2.jpg
Picture2.jpg (18.24 KiB) Viewed 1891 times

When I use the following sole criteria in the Row tab, the resultant output is only descendants of the "Starting Person".
Add if =IsTrue(IsAncestorOf(["Starting Person"],) and IsAncestorOf(["Second Person"],)) is true

If combine criteria as follows:
Add if =IsTrue(IsAncestorOf(["Starting Person"],) and IsAncestorOf(["Second Person"],)) is true
Add if spouse of [“Starting Person”]. Include original individual
Add if an ancestor of anyone in the current result set.
Add if an descendant of anyone in the current result set.
Add if a spouse of anyone in current result set.


I seem to get all relatives and the same individual appears as:

Picture1.jpg
Picture1.jpg (17.55 KiB) Viewed 1894 times
Gary
Win 10, FH 7.0.15

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Common relationships between two people

Post by tatewise » 23 Mar 2022 10:26

Sorry, I should have been clearer. The only Rows tab filter needed is the =IsTrue( IsAncestorOf(...) and ... ) expression.

All those other Rows tab filters will override that one filter and include most ancestral relatives.

As you have discovered, you need a Starting Person and a Second Person to act as the two roots.

Remember that I specifically mentioned how the IsAncestorOf(...) parameters are applied:
The function "Takes 2 Individual records as parameters and returns TRUE if the 1st is the ancestor of the 2nd."
So, IsAncestorOf( ["Starting Person"], %INDI% ) returns TRUE if Starting Person is the ancestor of %INDI% current person.
Consider if that is what you need?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Gary Carson
Famous
Posts: 162
Joined: 02 Mar 2016 17:46
Family Historian: V7
Location: Grand Island, Nebraska, USA

Re: Common relationships between two people

Post by Gary Carson » 23 Mar 2022 13:48

Using Add if =IsTrue(IsAncestorOf(["Starting Person"],%INDI%) and IsAncestorOf(["Second Person"],)) is true returns only descendants of Starting Person.

Am trying to check if relative of Starting Person is also relatives of Second Person.

What I want to eliminate is Target person is Starting Person's second cousin and Target person is Second Person's husband's second cousin. Where Starting Person and Second Person are husband and wife.

Looking for result like Picure2 in previous post, not Picture1.
Gary
Win 10, FH 7.0.15

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Common relationships between two people

Post by tatewise » 23 Mar 2022 14:22

You are missing the point regarding IsAncestorOf(...).
The function returns TRUE if the 1st parameter is an ancestor of the 2nd parameter.
So it returns TRUE if Starting Person parameter is an ancestor of %INDI% parameter.
i.e. This person %INDI% is a descendant of the Starting Person which is what you are getting listed.

Whereas, IsAncestorOf( %INDI%, ["Starting Person"] ) returns TRUE if this person %INDI% is an ancestor of Starting Person which is what you want.

What gets shown in the Result Set Columns depends on the Columns tab Expressions.
So your Picture1 and Picture2 queries must have different Columns tab Expressions.
Use whatever Expressions you used in the Query that produced Picture2.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Gary Carson
Famous
Posts: 162
Joined: 02 Mar 2016 17:46
Family Historian: V7
Location: Grand Island, Nebraska, USA

Re: Common relationships between two people

Post by Gary Carson » 23 Mar 2022 14:38

=IsTrue(IsAncestorOf(%INDI%,["Starting Person"]) and IsAncestorOf(["Second Person"],)) returned no results. I guess I am just not getting correct expression.
Gary
Win 10, FH 7.0.15

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Common relationships between two people

Post by tatewise » 23 Mar 2022 14:47

Look at the second IsAncestorOf(...) function!
When does it return TRUE?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Common relationships between two people

Post by Jane » 23 Mar 2022 15:11

You appear to be looking for all Blood Relations, rather than just ancestors. So would it not be simpler to simply prompt for the two people you want to compare and then test for DnaBloodRelation

So
Add if =DnaBloodRelation(["Person"], %INDI%) true
Exclude if =DnaBloodRelation(["Person2"], %INDI%) false
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Common relationships between two people

Post by tatewise » 23 Mar 2022 15:40

Quite possibly, which is why I said "it hinges on exactly what you mean by Common relationships between two people and only common ancestors which are not identical". Gary seems to be happy with the direct ancestors case.

Jane, does that pair of filters include all direct descendants of the two people, which in this thread are husband and wife?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Gary Carson
Famous
Posts: 162
Joined: 02 Mar 2016 17:46
Family Historian: V7
Location: Grand Island, Nebraska, USA

Re: Common relationships between two people

Post by Gary Carson » 23 Mar 2022 16:16

I think I got off track. Blood relation is more correct; not just direct ancestors. My error in creating this confusion.
Gary
Win 10, FH 7.0.15

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Common relationships between two people

Post by Jane » 23 Mar 2022 16:34

Mike: It would, but only where the two people were the parents, so if not needed a simply exclude if descendants of "person" would remove them.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Common relationships between two people

Post by tatewise » 23 Mar 2022 16:51

OK, to avoid prolonging the thread here are the Rows tab filters based on Jane's suggestion:

Code: Select all

Exclude unless	=DnaBloodRelation( ["Person1"], %INDI% )	is true
Exclude unless	=DnaBloodRelation( ["Person2"], %INDI% )	is true
Exclude if	=IsDescendantOf( %INDI%, ["Person1"] )		is true
Note that 2nd filter is 'inverse' of Jane's because there is no is false option.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Gary Carson
Famous
Posts: 162
Joined: 02 Mar 2016 17:46
Family Historian: V7
Location: Grand Island, Nebraska, USA

Re: Common relationships between two people

Post by Gary Carson » 23 Mar 2022 16:59

Thanks for everyone's patience.
Gary
Win 10, FH 7.0.15

User avatar
Gary Carson
Famous
Posts: 162
Joined: 02 Mar 2016 17:46
Family Historian: V7
Location: Grand Island, Nebraska, USA

Re: Common relationships between two people

Post by Gary Carson » 23 Mar 2022 17:06

That last criteria worked exactly as desired. Again, a special thanks.
Gary
Win 10, FH 7.0.15

Post Reply