* How would I add the witness' relationship in the sentence

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
avatar
settingup
Gold
Posts: 11
Joined: 22 Jan 2022 05:03
Family Historian: V7

How would I add the witness' relationship in the sentence

Post by settingup » 19 Feb 2022 01:01

I have found that the relationship function exists, but I am having trouble figuring out how to make it work.

https://www.family-historian.co.uk/help ... nship.html shows the parameters, but I'm not understanding how to input the two people.

What I am trying to do is add it into a witness statement on a residence fact. In more than one instance I find people living with other relatives, grandmother, brother, etc.

the current sentence template reads: {date} {individual} lived <at {address}> {place} <with {other=resident}> {note}

In stead of the sentence showing that person C lived with A and B I would like to mention how these people are related. C lived with his brother, A and his sister-in-law, B

I thought about changing the roles when adding them in as witnesses, but their role would change depending on whose sentence it was.
B lived with her husband, A and her-brother-in-law C while A lived with his wife, B and his brother, C

How do I make this work?
Thanks

User avatar
tatewise
Megastar
Posts: 27089
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: How would I add the witness' relationship in the sentence

Post by tatewise » 19 Feb 2022 10:47

The simple answer is that you cannot use the relationship functions in that context.

Many users have asked before and it is not possible because the <with {other=resident}> code is automatically created and no functions can be invoked per witness.

One alternative is to edit the Sentence Template for each specific fact to say literally whatever you want.

It is just possible to get close to a solution by using complex Sentence Template functions such as follows.

For the Principal Sentence Template you could use:
{date} {individual} lived {place}
{=CombineText( Text( " with " . Relationship(%CUR_PRIN%,%FACT._SHAR[1]>%,TEXT,1) . " " ), %FACT._SHAR[1]%, , )}
{=CombineText( Text( " and " . Relationship(%CUR_PRIN%,%FACT._SHAR[2]>%,TEXT,1) . " " ), %FACT._SHAR[2]%, , )}
{=CombineText( Text( " and " . Relationship(%CUR_PRIN%,%FACT._SHAR[3]>%,TEXT,1) . " " ), %FACT._SHAR[3]%, , )}

and then repeat the {=CombineText(...)} function for as many Witnesses (%FACT._SHAR[n]>%) as needed.
You must tolerate and between each Witness unless you test to see in the next %FACT._SHAR[n]% exists and use a comma except for the last Witness.

For the Witness Sentence Template you could similarly use:
{date} {individual} lived {place}
{=CombineText( Text( " with " . Relationship(%CUR~WITN>%,%FACT._SHAR[1]>%,TEXT,1) . " " ), %FACT._SHAR[1]%, , )}
{=CombineText( Text( " and " . Relationship(%CUR~WITN>%,%FACT._SHAR[2]>%,TEXT,1) . " " ), %FACT._SHAR[2]%, , )}
{=CombineText( Text( " and " . Relationship(%CUR~WITN>%,%FACT._SHAR[3]>%,TEXT,1) . " " ), %FACT._SHAR[3]%, , )}

and then repeat the {=CombineText(...)} function for as many Witnesses (%FACT._SHAR[n]>%) as needed.
An extra complication is dealing with the case where the {individual}/%CUR~WITN>% and the %FACT._SHAR[n]>% are the same person and excluding the {=CombineText(...)} function.
i.e. Something like this for every Witness:
{=TextIf( IsSameItem(%CUR~WITN>%,%FACT._SHAR[1]>%), ,
CombineText( Text( " with " . Relationship(%CUR~WITN>%,%FACT._SHAR[1]>%,TEXT,1) . " " ), %FACT._SHAR[1]%, , ) )}

The problem then is which one needs with and which need comma or and?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply