Page 1 of 1

Question re: Fact Query

Posted: 22 Jun 2010 02:15
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

Question re: Fact Query

Posted: 22 Jun 2010 08:07
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.

Question re: Fact Query

Posted: 22 Jun 2010 23:28
by kathykult
Jane,
Thanks so much for your help on this -- it works perfectly! :-)
Kathy