* Shared Sentence structure

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
TMG_refugee
Famous
Posts: 111
Joined: 14 Nov 2015 15:44
Family Historian: V7

Shared Sentence structure

Post by TMG_refugee »

I thought I had the following sentence structure for a shared fact working but it appears not to be.

{individual} appeared < in the {date:YEAR} census> as head of household < in {role=Head of Household}'s household> <at {address}> < {place}> <with wife {role=Wife}> . The census was enumerated {date}. <br>
<Other household members were:
<<br> Son: {role(single)=Son}>
<<b> Sons: {role(plural)=Son}>
<<br> Daughter: {role=Daughter}>
<<br> Daughters: {role=Daughter(plural)}>
<<br> Mother: {role=Mother}>
<<br> Mothers: {role=Mother(plural)}>
<<br> Father: {role=father}>
<<br> Fathers: {role=father(plural)}>
<<br> Grandson: {role=Grandson}>
<<br> Grandsons: {role=Grandson(plural)}>
<<br> Granddaughter: {role=Granddaughter}>
<<br> Granddaughters: {role=Granddaughter(plural)}>
<<br> Daughter-in-law: {role=Daughter-in-law}>
<<br> Daughters-in-law: {role=Daughter-in-law(plural)}>
<<br> Son-in-law: {role=Son-in-law}>
<<br> Sons-in-law: {role=Son-in-law(plural)}>
<<br> Father-in-law: {role=Father-in-law}>
>

Everything seems to work except for the red line: <Other household members were:
does not print out. I was hoping that if any of the roles were present that the red line would print.

will this approach work or must I get more complicated in my sentence structure?
User avatar
tatewise
Megastar
Posts: 28451
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Shared Sentence structure

Post by tatewise »

The problem is that you cannot nest < ... > inside each other.

The only solution that occurs to me is to use something along the lines of:
{=TextIf( Exists(%FACT._SHAR%), " Other household members were: ", "" )}

But that does not exclude the Roles of Head of Household and Wife, so the condition needs expanding.
e.g. Something like:
IsTrue( Exists(%FACT._SHAR%) and Not(%FACT._SHAR.ROLE% = "Head of Household" or %FACT._SHAR.ROLE% = "Wife") )

For that to work, you must ensure that other household member Roles come before those two special cases.

You must also ensure the Sentence Template does not exceed 1,000 characters, otherwise it will get truncated.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
TMG_refugee
Famous
Posts: 111
Joined: 14 Nov 2015 15:44
Family Historian: V7

Re: Shared Sentence structure

Post by TMG_refugee »

Mike,

Thank you for the response. I tried the first solution and it worked fine but I will need to refine my sentence structure slightly.

The second solution where the order of witnesses is important are you referring to the order in the sentence structure itself or in the order the witnesses appear in the actual fact under a particular person?

Another question. I made the changes to the actual sentence for a particular fact and not the basic fact type sentence structure. After changing the basic fact type sentence it did not seem to propagate to the individuals fact since they had been changed. Is there a way to force the new sentence structure to all facts that use that type?

I assume that all the functionality is purely FH and CP. Other than the help file is there any source that you would recommend? I suspected the nested conditional statements but was unsuccessful in finding that they are not permitted.
User avatar
tatewise
Megastar
Posts: 28451
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Shared Sentence structure

Post by tatewise »

Have you checked the '1st solution' with only one or two witnesses that only have the Role of Wife or Head of Household?
You will get Other household members were: inserted in the sentence but there will be no members included.

Regarding the '2nd solution', think about what it is testing. It is checking FACT._SHAR[1].ROLE in the Census event.

To get Tools > Fact Types > Census > Sentence Template to apply you must undo every manual edit to any specific fact Sentence, i.e. delete it or use Edit > Undo. See how_to:narrative_report_fact_sentence_templates#specific_fact_sentences|> Specific Fact Sentences.

The only other advice is in how_to:narrative_report_fact_sentence_templates|> Narrative Report Fact Sentence Templates but that does not say anything extra about < ... > angle brackets. However, the clue is in the wording of the Help page: "You do this by putting angle brackets <> around the template code. Any text within the angle brackets will only be output if the template code is not empty."
i.e. There must be one, and only one, curly bracketted template code within the angle brackets.
It does not behave well if there is no template code or more than one template code.

It is common practice in technical advice like that to only say what will work and not all the scenarios that won't work.

With the '2nd solution' it seems that the Sentence Template just exceeds 1,000 characters and if you were to add any more household member roles would definitely exceed 1,000 characters. So that will not be successfully preserved in the Fact Types definition and will get truncatd at 1,000 characters.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
TMG_refugee
Famous
Posts: 111
Joined: 14 Nov 2015 15:44
Family Historian: V7

Re: Shared Sentence structure

Post by TMG_refugee »

Mike

When I tested the first solution I realized that I would need to make changes to the sentence. Other than the head of household I will be putting everyone down after the "other member" wording. I am hoping that the "other members" test does not include the primary person for this fact but just the witnesses. I will need to test this to verify.

I also realized the the second solution would exceed the 1,000 character limit so what I was attempting to do would not fit into a single sentence.

I will attempt to bring down the help into a PDF so that I can make comments, highlight, add sections to the help file as I study it in much more detail. Your pointing out how the nested conditionals was worded is worth a comment so I don't make the same mistake later on.

For now I will work with solution one and I believe I can get almost the same output as I had intended.

Thanks again Mike.

p.s., There is a six hour time delay between us so the responses can be delayed.
Post Reply