Page 1 of 1

Fact sentence structure - output error

Posted: 02 Mar 2022 12:13
by Richard H. B.
Hello,

As a new user of FH, I have been experimenting with Fact sentence templates (as I have a few custom facts from Legacy that I want to re-create in FH) and have come across a “bug” in Narrative reports.

For example, I have created a new fact (Birth Informant) that uses the following sentence structure:

{individual} reported the birth of {note} {date} {place} {age}

This gives me the desired outcome, as can be seen in the sentence field towards the bottom of the Property box.
Fact Sentence Fault - in Prop Box.jpg
Fact Sentence Fault - in Prop Box.jpg (118.39 KiB) Viewed 1167 times
But when I generate an Individual Narrative report the sentence is not output as was shown in the Property Box but with the date prefix capitalised and closed up, as shown in this image.
Fact Sentence Fault - in Report.jpg
Fact Sentence Fault - in Report.jpg (72.34 KiB) Viewed 1167 times
Experimenting further with the placement of the {note} code i.e. placing the note code between the date and place codes (which I know doesn’t read correctly but is just for testing purposes) gives the same result/error – the prefix for the place (in) has now become capitalised and closed up in the Report, although it shows correctly in the Property Box.

I then experimented further using the (standard) Census fact and can re-create the same error for it i.e. adding the {note} code affects the following {whichever code} prefix output in a Report, in the same manner.

Having had no previous experience with earlier versions of FH, I am wondering if this always been the case or is it a regression (either way, it is a “bug” in my opinion).

I thought I would run this past the group to gauge their opinion before submitting it to CP support.

Regards, Richard

Re: Fact sentence structure - output error

Posted: 02 Mar 2022 13:02
by tatewise
That problem has been raised before and I thought had been reported to CP already.
However, I cannot locate the posting for it just now ~ so let me search a bit longer.

Re: Fact sentence structure - output error

Posted: 02 Mar 2022 14:36
by tatewise
The problem was discussed in the following two postings:
Fact definitions & unwanted carriage returns (19695) and was reported in Aug 2021.
Sentence different from property box & report (20016)

As discussed there, a workaround is to use {%FACT.NOTE2%} instead of {note} but there may be side effects.

You could report it to CP again via http://www.calico-pie.com/osticket/open.php in case they misunderstood the first report.

Re: Fact sentence structure - output error

Posted: 02 Mar 2022 15:58
by Richard H. B.
Mike,

Thanks for taking the time to respond, as much as I searched for something on this forum beforehand, I did not find your two topics. Anyway, I have tried the workarounds discussed in those topics and, although it does "cure" my immediate problem, I find that, by unticking the "Inc. Events/Attr. Notes" option, other facts are now missing the relevant notes (the side effects that were mentioned).

Therefore, this "cure" is not an option for me. I shall report it to CP, to add further weight to previous support tickets, and hopefully they will find a solution. After all, the fact sentence is reading correctly in the Property Box, just not in the Reports, so can it be that hard to fix? (I would have thought it uses the same underlying codebase).

Richard

Re: Fact sentence structure - output error

Posted: 02 Mar 2022 18:50
by AdrianBruce
... I would have thought it uses the same underlying codebase ...
I think "sort of" is the answer to that thought. I'd assume that the bulk of the code is identical but layered on top (if that's the right description) of what appears in the Property Box is further manipulation. For instance, whereas a sequence of sentences in the Property Box might start with "Fred Bloggs ..." (the name of the principal), when those facts appear in a Narrative Report, there is extra logic to avoid multiple references to "Fred Bloggs" and replace some of them with "He" according to some logic that applies at the Report level, not the Fact level.

Maybe the {Note} manipulation has similar manipulation? I don't know because I'm afraid I never put anything in my Note that would appear in the middle of a narrative sentence for two reasons - (1) I write long notes and (2) for summary reports I sometimes omit the notes anyway. I agree, however, that it is supposed to work....

Re: Fact sentence structure - output error

Posted: 03 Mar 2022 16:27
by Richard H. B.
UPDATE:
After submitting a support ticket to CP against this problem, Martin (from CP) has come up with a possible solution, in my case.

Instead of making my custom fact (Birth Informant) an Event (which I had) he has suggested making it an Attribute and using the sentence template of "{individual} reported the birth of {value} {date} {place} {age}". He has said the the {value} field does not have any of the complications associated with notes.

Having tried this out I can report that it works for me. I get the output I desire for this fact in the Narrative reports (and what I see in the Prop box sentence is what I get in the reports) and I can keep the "Inc. Event/Attr. notes" Report option ticked, so not losing the notes from other facts.

Richard

Re: Fact sentence structure - output error

Posted: 03 Mar 2022 17:22
by tatewise
OK, that is a workaround for some circumstances.
However, it is not a solution for Events, especially standard Events that cannot be changed to an Attribute.
Also, editing long text in the small value box is inconvenient compared with the Note box and does not allow for multiple lines.

IMO it is ducking the issue. Are you prepared to reply saying that it is a workaround for that particular case but does not work elsewhere in general.

Re: Fact sentence structure - output error

Posted: 03 Mar 2022 20:41
by Richard H. B.
Martin has already told me that CP would look into this problem, when he offered me this solution.

Richard

Re: Fact sentence structure - output error

Posted: 03 Mar 2022 21:16
by tatewise
OK, I did not know that and will delete the previous two postings.

Re: Fact sentence structure - output error

Posted: 03 Mar 2022 21:24
by ColeValleyGirl
Mike, rewriting history? Why delete them when they're useful information for others.