Page 1 of 1

Can you include relationship to root in a query?

Posted: 09 Jul 2009 18:50
by Aulus
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

Can you include relationship to root in a query?

Posted: 09 Jul 2009 19:19
by davepacey
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,

Can you include relationship to root in a query?

Posted: 09 Jul 2009 19:22
by gerrynuk
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

Can you include relationship to root in a query?

Posted: 10 Jul 2009 17:07
by Aulus
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?

Can you include relationship to root in a query?

Posted: 10 Jul 2009 18:00
by Jane
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.

Can you include relationship to root in a query?

Posted: 10 Jul 2009 18:06
by Aulus
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.

Can you include relationship to root in a query?

Posted: 10 Jul 2009 18:09
by Aulus
Oops, just realised I said birth when I meant to say marriage.

Sorry for the confusion!

Can you include relationship to root in a query?

Posted: 10 Jul 2009 19:10
by Jane
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