Page 1 of 1
Fact sentence starting with lower case
Posted: 09 Mar 2023 01:34
by BillH
I know I've seen this mentioned before, but for some reason I am not able to locate the posting.
I have a fact sentence defined as follows:
{individual} enlisted in the military {date} <in {_place}>. {individual} <served {=TextPart(GetLabelledText(%FACT.NOTE2%,"Served: "), 1, 0, TIDY)}>
In my note I have: Served: in Lord Dunmore's War.
The resulting sentence is: He enlisted in the military in October 1774. he served in Lord Dunmore's War.
I can't figure out how to make the second sentence start with a capital H. Is this an outstanding bug in FH? Is there a workaround? Have I coded it incorrectly?
Thanks,
Bill
Re: Fact sentence starting with lower case
Posted: 09 Mar 2023 10:36
by laz_gen
Why not replace the ".<individual>" with the word "and" so it reads:
He enlisted in the military in October 1774 and served in Lord Dunmore's War.
{individual} enlisted in the military {date} <in {_place}> and <served {=TextPart(GetLabelledText(%FACT.NOTE2%,"Served: "), 1, 0, TIDY)}>
Re: Fact sentence starting with lower case
Posted: 09 Mar 2023 10:50
by tatewise
That looks like a bug that should be reported to CP.
BTW: The template relies upon that labelled note and if there is none then the 2nd sentence just says
he resulting in:
He enlisted in the military in October 1774. he
I can think of two workarounds:
- Remove the period and replace 2nd {individual} with and similar to laz_gen but also move the opening <
{individual} enlisted in the military {date} {place}< and served {=TextPart(GetLabelledText(%FACT.NOTE2%,"Served: "), 1, 0, TIDY)}>
*
- Replace 2nd {individual} with {=Sex(%CUR_PRIN%,"He","She","They")} and use =CombineText(...) function:
{individual} enlisted in the military {date} {place}. {=CombineText(Sex(%CUR_PRIN%,"He served ","She served ","They served "), TextPart(GetLabelledText(%FACT.NOTE2%,"Served: "), 1, 0, TIDY),)}
Note that
<in {_place}> is replaced by
{place} that automatically inserts the prefix
in when there is a Place.
Re: Fact sentence starting with lower case
Posted: 09 Mar 2023 16:30
by BillH
laz_gen wrote: ↑09 Mar 2023 10:36
Why not replace the ".<individual>" with the word "and" so it reads:
He enlisted in the military in October 1774 and served in Lord Dunmore's War.
{individual} enlisted in the military {date} <in {_place}> and <served {=TextPart(GetLabelledText(%FACT.NOTE2%,"Served: "), 1, 0, TIDY)}>
That's a good idea. I'll give that a try.
Thanks,
Bill
Re: Fact sentence starting with lower case
Posted: 09 Mar 2023 16:45
by BillH
tatewise wrote: ↑09 Mar 2023 10:50
BTW: The template relies upon that labelled note and if there is none then the 2nd sentence just says
he resulting in:
He enlisted in the military in October 1774. he
I missed that. For now I will go with using "and" in the sentence as laz_gen suggested along with your modification to fix the problem if I have no labelled note. I will report the bug to CP.
Thanks,
Bill
Re: Fact sentence starting with lower case
Posted: 09 Mar 2023 20:23
by BillH
Mike and laz_gen,
Thanks for your help. I have decided to change my sentence a bit. Now I have:
{individual} enlisted in the military {date} {place}. <{=TextPart(GetLabelledText(%FACT.NOTE2%,"Service: "), 1, 0, TIDY)}>
Now I am using the label "Service:" in my note. This allows me to have as many sentences as I want which allows me more flexibility in my sentences.
I opened a ticket with CP (#202831). They replied "I have logged it and it will be passed to the developers for evaluation.
".
Thanks,
Bill
Re: Fact sentence starting with lower case
Posted: 09 Mar 2023 21:45
by tatewise
In that case, I don't think you need the < chevrons > around the function.
Can you explain why you need =TextPart( ... , 1, 0, TIDY) as all that does is remove adjacent commas and spaces.
Re: Fact sentence starting with lower case
Posted: 09 Mar 2023 22:36
by BillH
I probably don't. I just copied it from another sentence definition that had it.
Bill