* Question re: Fact Query

Homeless Posts from the old forum system
Locked
User avatar
kathykult
Gold
Posts: 17
Joined: 17 Aug 2006 15:07
Family Historian: V7
Location: Belvidere, IL
Contact:

Question re: Fact Query

Post by kathykult »

I've made a custom Fact Query in FH 4.1.2, and would like to list the Relationship of the Wife (or Husband) of each record returned. I've tried this as the expression:

 =Relationship(FileRoot(),%FACT.WIFE%,TEXT,1)

But it returns the error:
'The expression entered is not recognised as a valid function, or some parameters were entered incorrectly.'

What am I doing wrong? I've also tried '%FACT.WIFE>% as the second parameter in the expression, but that doesn't work either.

Any help is most appreciated!

Sincerely,
Kathy Kult

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

Question re: Fact Query

Post by Jane »

A fact is not a record, which is why you use FactOwner to return the individual record.

So you need to use GetField or Field function.

=Relationship(FileRoot(),Field(FactOwner(%FACT%,1,MALES_FIRST),'INDI.~SPOU>'),TEXT,1)

To break this one down.

Code: Select all

=Relationship(
     FileRoot(),
         Field(
               FactOwner(%FACT%,1,MALES_FIRST)
                                 ,'INDI.~SPOU>')
                                             ,TEXT,1)
So we Get the FactOwner then use the Field function to get the record for the owners Spouse and then we use the relationship element to get the Relationship.
User avatar
kathykult
Gold
Posts: 17
Joined: 17 Aug 2006 15:07
Family Historian: V7
Location: Belvidere, IL
Contact:

Question re: Fact Query

Post by kathykult »

Jane,
Thanks so much for your help on this -- it works perfectly! :-)
Kathy
Locked