* Relationship expression

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
laz_gen
Famous
Posts: 177
Joined: 03 Apr 2018 14:02
Family Historian: V7
Contact:

Relationship expression

Post by laz_gen »

I have created a custom DNA fact that I have attached to various individuals in my records. I would like the fact sentence to show the relationship between that individual owning the DNA fact and myself as a fixed individual.

I have found the Relationship function =Relationship(["Individual"],%INDI%,TEXT,1) and have tried various combinations but with no luck.

There are some mentions on the forum of such an expression to the root person =Relationship(FileRoot()) but I often move the Root Person depending on which branch or group of people I am working on, so need the expression anchored on myself.

I would like the expression to produce a sentence such as "Jane Doe is the third cousin once removed of John Doe", with Jane Doe being the fact owner and John Doe being myself.

I have my wife and her family in the same project and she has also undertaken a DNA test so I would like to extend this to her family with a separate DNA fact.

All help appreciated.
User avatar
Jane
Site Admin
Posts: 8508
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Relationship expression

Post by Jane »

Have you tried

Code: Select all

=Relationship(Record(9999,'I'),%INDI%,TEXT,1)
Where 9999 is your record ID?
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: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Relationship expression

Post by tatewise »

Unfortunately the %INDI% data reference does not work in the Sentence Template context and %CUR_PRIN% must be used.
Also, the function needs to be enclosed in { curly brackets }.
i.e.
{=Relationship( Record(9999,"I"), %CUR_PRIN%, TEXT, 1 )}

The full Sentence Template would then be:

{%CUR_PRIN%} is the {=Relationship( Record(9999,"I"), %CUR_PRIN%, TEXT, 1 )} of {=Record(9999,"I")}

where 9999 is the Record Id of your record in one case and your wife's record in the other case.

See the Help for Understanding Data References and Relationship Functions for further details.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
laz_gen
Famous
Posts: 177
Joined: 03 Apr 2018 14:02
Family Historian: V7
Contact:

Re: Relationship expression

Post by laz_gen »

Jane
I tried your suggestion but I couldn't get it to work even adding curly brackets as I found mentioned in the help file.

Mike
I just saw your reply and that works perfectly


Thanks to you both
Post Reply