* Fact definitions & unwanted carriage returns

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile
Post Reply
User avatar
wulliam
Famous
Posts: 138
Joined: 03 Oct 2009 10:29
Family Historian: V7
Contact:

Fact definitions & unwanted carriage returns

Post by wulliam » 06 Aug 2021 16:39

Hi.

I'm trying to tidy up some of my hastily constructed facts from a few years ago, and have hit a snag that I can't get to the bottom of.
fh_query.png
fh_query.png (41.57 KiB) Viewed 600 times
As you can see the Sentence is picking up all of the elements but leaving carriage returns in strange places, highlighted by the red blocks. Also the 'in' prior to the date is capitalised.

Can someone tell me where I'm going wrong with these two issues?

Many thanks!
William

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

Re: Fact definitions & unwanted carriage returns

Post by tatewise » 06 Aug 2021 20:13

The newline is caused by a newline at the end of the local Note on that fact.

However, the capital I possibly preceded by a fullstop is a strange 'feature' of using the {note} code.
I think it must be a bug that should be reported to CP via http://www.calico-pie.com/osticket/open.php

What is very strange is that the Sentence shown in the Facts tab differs from the sentence in the Narrative report.
That is very odd. I've never seen that before.

If you replace {note} with {%FACT.NOTE2%} then it may cure the problem but is unsuitable if the Note text is very long.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
wulliam
Famous
Posts: 138
Joined: 03 Oct 2009 10:29
Family Historian: V7
Contact:

Re: Fact definitions & unwanted carriage returns

Post by wulliam » 06 Aug 2021 20:33

Thanks Mike - have reported it as you suggest...I simply pointed them to this thread so they should see the comment below as well.

I've also replaced {note} with {%FACT.NOTE2%} and now have this, which is an improvement, although there still seems to be a leading space before "in November 1850". The contents of the note then reappear unattached to anything.
fh_query.png
fh_query.png (18.62 KiB) Viewed 553 times
William

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

Re: Fact definitions & unwanted carriage returns

Post by tatewise » 06 Aug 2021 20:50

You must be careful about space characters in the Sentence Template and the Note text.
The Template has a space between {%FACT.NOTE2%} and {date} so the Note text must not end with a space.
However, if there is no Note text, the space between victims and {%FACT.NOTE2%} and {%FACT.NOTE2%} and {date} will produce two adjacent spaces.
One solution is to use ... victims< {%FACT.NOTE2%}> {date}. so that the first space is conditional on the Note text.

The duplicated Note text is a side-effect of using {%FACT.NOTE2%} instead of {note}.
The Report > Options > Main tab has Inc. Event/Attr Notes ticked by default.
It recognises when {note} is in the Sentence Template and avoids duplicating the Note.
But it does not recognise {%FACT.NOTE2%} in the same way, so you must untick the Inc. Event/Attr Notes option.
Hopefully, you don't need Notes to be included by that option. If you do then there is no simple solution.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
wulliam
Famous
Posts: 138
Joined: 03 Oct 2009 10:29
Family Historian: V7
Contact:

Re: Fact definitions & unwanted carriage returns

Post by wulliam » 07 Aug 2021 14:21

Thanks very much, Mike - that has solved the issues nicely.
William

Post Reply