* Sentence function confusion x 2

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
BakerJL75
Famous
Posts: 200
Joined: 14 Dec 2020 11:29
Family Historian: V7

Sentence function confusion x 2

Post by BakerJL75 » 07 Mar 2021 16:50

This is my somewhat convoluted sentence:

{individual's} social security number was {value}. {individual} applied for it {date}. <{%CUR_PRIN.NAME[1]:FIRST%} was employed by {=GetLabelledText (%FACT.NOTE2%,"Employer:")}. >< {=SEX(%CUR_PRIN%, "He", "She", "Their")} was a {=GetLabelledText(%FACT.NOTE2%,"Occupation:")}.>

The note field contains:
Employer: the Valley Heights Golf Course, Oakmont, Pennsylvania
Occupation: caddy

Here is the output in the narrative report:

Russell's social security number was 123-45-6789. Russell applied for it on 17 May 1944. Russell was employed by the Valley Heights Golf Course, Oakmont, Pennsylvania. Russell was a caddy.(*6,7,8) Employer: the Valley Heights Golf Course, Oakmont, Pennsylvania Occupation: caddy

First question: It prints the sentence correctly, but then also outputs Employer: etc and Occupation: caddy. How do I get rid of those? If I use privacy brackets, none of it prints.

Second question: How can I force the sentence (in aqua) to start with "He" instead of Russell? It seems like I explcitly said He with the {=SEX(%CUR_PRIN%, "He", "She", "Their")} function. But it is totally ignored. I just want more variety.
Thanks,
Jackie

User avatar
LornaCraig
Megastar
Posts: 2996
Joined: 11 Jan 2005 17:36
Family Historian: V7
Location: Oxfordshire, UK

Re: Sentence function confusion x 2

Post by LornaCraig » 07 Mar 2021 17:22

First answer: In Report Options> Main tab there is an option to Inc. Event/Attr Notes. If this option is selected the note will always be appended after the main sentence. But of course if you un-select it this will apply to all events/attributes throughout the report, so none of the event/attribute notes will be included. (One way round this, if you only occasionally want the note included in the report, is to omit the notes globally but customise the sentence for a few individuals' facts on a case by case basis, adding {note} to the sentence.)

Second answer: I think FH only uses He/She or His/Her at the beginning of the first or only sentence for a given fact, and even then it depends on the context in the report. The {individual's} at the beginning of the template will sometimes be 'translated' as His/Her and sometimes as the name, depending on what comes immediately before it in the narrative.
Lorna

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

Re: Sentence function confusion x 2

Post by tatewise » 07 Mar 2021 17:32

The problem with the Sentence Template is the < conditional brackets >
They are only valid with a single conditional value and is a common mistake made by users.
Yours has two conditional values for the {=Sex(...)} function and the {=GetLabelledText(...)} function.
I know the first always returns a value but FH does not realise that.

So you need to use the {=CombineText(...)} function instead of the < conditional brackets >
e.g.
{=CombineText(Text(Sex(%CUR_PRIN%,"He","She","Their") . " was a "),GetLabelledText(%FACT.NOTE2%,"Occupation:"),".")}

As Lorna says, the red text is caused by the default inclusion of all Note text in Reports.
If you change the options then all Note text will get excluded.
So to prevent just your labelled Note text from being included surround them in [[ privacy ]] brackets.
e.g.
[[
Employer: the Valley Heights Golf Course, Oakmont, Pennsylvania
Occupation: caddy
]]

Do not put the [[ on the same line as Employer: because labels must be at the start of the line.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
BakerJL75
Famous
Posts: 200
Joined: 14 Dec 2020 11:29
Family Historian: V7

Re: Sentence function confusion x 2

Post by BakerJL75 » 07 Mar 2021 18:41

Thanks everyone.
Thanks,
Jackie

Post Reply