* Can you include relationship to root in a query?

Older V3 Queries please post for any version in the General Forum
Locked
avatar
Aulus
Gold
Posts: 18
Joined: 17 Mar 2007 21:46
Family Historian: None

Can you include relationship to root in a query?

Post by Aulus » 09 Jul 2009 18:50

Please be gentle - I'm a newbie when it comes to FH queries, and am finding it all a bit goobledygook, but learning *slowly* from the query store here.

I downloaded some queries from the query store here, including 'Missing Statutory Birth Certificates'.

I'm just thinking that what would make it the real bees knees is if I could put a column into the results display which showed relationship to root, so that I could sort by that and hence prioritise which certificates are missing.

But I can't find anything in the help and I've done a search of this site for 'relationship to root in queries' and the two results it came back with didn't address my question.

So, has anyone done this, and if so how?

I'm using FH v. 3.1.2

ID:3860

avatar
davepacey
Famous
Posts: 135
Joined: 22 Nov 2002 19:00
Family Historian: V7
Location: Lincolnshire, UK

Can you include relationship to root in a query?

Post by davepacey » 09 Jul 2009 19:19

Hi,

What you need to do is run the query, then click on the columns tab,in the right hand window, in the heading box, type a suitable heading, i.e. Relationship, in the expression box type =Relationship(FileRoot()) then click on the add box, run the query and you will have the column headed relationship.

All the best,
Dave Pacey - Lincolnshire UK

User avatar
gerrynuk
Megastar
Posts: 565
Joined: 25 Apr 2007 09:21
Family Historian: V6
Location: Welwyn Garden City
Contact:

Can you include relationship to root in a query?

Post by gerrynuk » 09 Jul 2009 19:22

Click on the Columns tab. In the Heading field type 'Relationship to Root' (without the quotes!) and in the Expression field type:

=Relationship(FileRoot(),,TEXT,1)

(Best to copy and paste to ensure you get the text correct)

Then click the Add button and Run the query.

Gerry

avatar
Aulus
Gold
Posts: 18
Joined: 17 Mar 2007 21:46
Family Historian: None

Can you include relationship to root in a query?

Post by Aulus » 10 Jul 2009 17:07

Thanks!

That worked.

How would I get it to work on a query to find couples without an exact date of
[strike]birth [/strike] [edit: whoops, I mean marriage] - ie if there's two names, how does it know which one to use to calculate the relationship? Is it the one it's nearest to in the field order, maybe?

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

Can you include relationship to root in a query?

Post by Jane » 10 Jul 2009 18:00

I might be missing something, but how does the relationship tie to a date of birth?

Are you trying to do a 'Family Query' now. If so you will be looking at FAM.HUSB or FAM.WIFE and their dates.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

avatar
Aulus
Gold
Posts: 18
Joined: 17 Mar 2007 21:46
Family Historian: None

Can you include relationship to root in a query?

Post by Aulus » 10 Jul 2009 18:06

Hi Jane,

What I'm trying to do is get lists of people for whom I should have bmd certificates (i.e. where the bmd event is 1837 onwards).

There are some queries in the query store here that do that.

But because some of the lists generated are quite long (I spend too much time tracking distant cousins because they're usually more interesting than my line!), I'd like to be able to display the relationship to me in the query results so that I can sort by that to prioritise the closest relatives. E.g. I'd really want to make sure I had bmd certs for g, gg, ggg, gggg etc grandparents, but I'm less worried about 7th cousins 5 times removed!

The same would be applicable to missing census entries too.

avatar
Aulus
Gold
Posts: 18
Joined: 17 Mar 2007 21:46
Family Historian: None

Can you include relationship to root in a query?

Post by Aulus » 10 Jul 2009 18:09

Oops, just realised I said birth when I meant to say marriage.

Sorry for the confusion!

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

Can you include relationship to root in a query?

Post by Jane » 10 Jul 2009 19:10

If you are using a Family Query then you can use

=Relationship(FileRoot(),%FAM.HUSB>%,TEXT,1)
and
=Relationship(FileRoot(),%FAM.WIFE>%,TEXT,1)

If you are using an individual query then the original expression will work
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

Locked