* Template codes

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile
Post Reply
avatar
ColinMc
Famous
Posts: 185
Joined: 17 Jan 2019 11:35
Family Historian: V6.2
Location: Edinburgh

Template codes

Post by ColinMc » 15 Jan 2020 10:29

I haven't done a lot with Template Codes, so I may be missing something obvious.

I'm trying to edit the Burial Sentence text, to show the Address if it exists

Code: Select all

<in {address},> {_place}
works fine for me if both Place and Address exist (it is not perfect if I do not have Place as the comma is then superfluous, but if I know an Address, I will be able to include a Place as well).

Is there a way to ensure that {_place} is replaced by {place} if Address is not present? I suspect its is possible using the functions which the help file warns me against using unless Advanced. I'm nowhere near there yet, so would appreciate some help.

I will probably then edit some other texts with the same change. Thanks
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

User avatar
tatewise
Megastar
Posts: 18504
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Template codes

Post by tatewise » 15 Jan 2020 10:52

Often the word in before Address does not read very well but at almost always seems OK.
When at is used, it allows in to appear between Address and Place.
e.g.
He died in 1900 in 23, Park Road, Newtown, Kent. does not scan well
He died in 1900 at 23, Park Road in Newtown, Kent. reads OK
He was buried in 1900 at Park Road Cemetery in Newtown, Kent. also reads OK

So the Template for that is < at {address}> {place} which works for any combination of Address and Place field.
i.e.
He was buried in 1900 at Park Road Cemetery in Newtown, Kent. both
He was buried in 1900 at Park Road Cemetery. only Address
He was buried in 1900 in Newtown, Kent. only Place
He was buried in 1900. neither

In the very rare cases where the above does not read well, then edit the Sentence Template just for that specific fact in the Facts tab of the Property Box.
See Knowledge Base > Narrative Report Fact Sentence Templates.

Trying to get the word in with either Address or Place present and the comma only when both are present involves quite an advanced complex expression using functions.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
ColinMc
Famous
Posts: 185
Joined: 17 Jan 2019 11:35
Family Historian: V6.2
Location: Edinburgh

Re: Template codes

Post by ColinMc » 15 Jan 2020 11:01

Thanks, as usual, ridiculously fast response and a good answer too.

Much appreciated.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

Post Reply