* Emigration Sentence template

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
avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Emigration Sentence template

Post by ColinMc » 27 Mar 2020 19:34

When using the Emigration fact type,

Code: Select all

{individual} emigrated <from {_place}>< aboard the {=GetlabelledText(%FACT.NOTE2%,"ship")}> <to {_place2}> <{date}>< {age},>< arriving on {=GetlabelledText(%FACT.NOTE2%,"date")}. >

is there a way to show the short place name for {_place} & {_place2}. Almost all my emigrations are from major ports to major ports, so I do not need to see London, Greater London, England to Brisbane, Queensland, Australia. I appreciate I could simply not enter the full place details, but this would then impact the Places lists. If the odd lesser known port slips through, I could live with that.

I tried adding .SHORT but that didn't work, and I couldn't spot anything in the KB.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

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

Re: Emigration Sentence template

Post by tatewise » 27 Mar 2020 19:54

Yes, it is a bit trickier than perhaps it should be.

If it were a {date} code then you can add qualifiers like {date:YEAR} or {date:MONTH}.
But that only works for dates and not any other codes, so {_place:SHORT} won't work.

You have to resort to the Data Reference equivalent of {_place} which is {%FACT.PLAC%}
Then you can add the qualifier such as {%FACT.PLAC:SHORT%} or {%FACT.PLAC:LONG%}

For {_place2} use {%FACT._PLAC:SHORT%}
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Emigration Sentence template

Post by ColinMc » 27 Mar 2020 20:18

Hi Mike

Thanks as usual for the prompt help.

I'm getting it to work for {_place}, but {_place2} is not working for me.

I pasted it in to make sure I wasn't making a mistake, but I cannot make it work.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

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

Re: Emigration Sentence template

Post by tatewise » 27 Mar 2020 20:37

You are absolutely correct, I did not check the 2nd Place case, and assumed it would work as for 1st Place.
Actually, {%FACT._PLAC%} does not work as an alternative to the {_place2} code, so it really is broken.

Please report that anomaly to Calico Pie in the usual way.

I have found a devious workaround, but it only works if there is just a single Emigration fact per person:
{%CUR_PRIN.EMIG._PLAC:SHORT%}

If there is more than one Emigration then that always references the 1st one.
So you would have to edit the Sentence Template of the 2nd Emigration instance specifically to use:
{%CUR_PRIN.EMIG[2]._PLAC:SHORT%}
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Emigration Sentence template

Post by ColinMc » 27 Mar 2020 20:49

Thank you that works now.

I do have a small number with multiple emigrations so I'll keep an eye out for this.

I'll file a report to Calico in the morning.

Great help.

Hope you and others in the group are all well


Colin
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Emigration Sentence template

Post by ColinMc » 27 Mar 2020 21:07

Bug report created
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Emigration Sentence template

Post by ColinMc » 28 Mar 2020 10:13

I have a question that is not directly related to what has gone before on this thread, but heavily linked.

As one part of this exercise, I reset the Fact Definition to Installation Settings.

I discovered that the deault installation settings use the following for a Witness Sentence

{individual} emigrated <from {_place}> <to {_place2}> {date} {age} <together with {other=principal,emigrant}>

but there is an override set as follows

Emigrated <from {_place}> <to {_place2}> <with {other=principal,emigrant}>

Both say essentially the same thing so I have no issue with the wording

But, why (most particularly for a program developer) would anyone set an override and a default. If you like the override format then surely that should be set as the new default.

Secondly, why is there not some clear indication on this screen that an override is in place.

emigrant.jpg
emigrant.jpg (37.22 KiB) Viewed 8665 times

Surely a beginner (or non advanced) user is entitled to expect that the text he/she sees in front of them is the text that is being used, without having to hit the Advanced button which presumably is so named at least partly to deter non-advanced users from pressing it?

It seems crazy that at least 2 Facts (Emigration & Immigration) have at installation, Witness Sentences that are hidden from the non-advanced user. I'm guessing there are more, but have not checked.

I thought I saw reference to the Override option as being primarily to help develop a new code without deleting the original, but I cannot find it now. Otherwise, what is the practical purpose of the option? I can see the benefit for the principal, but not the witness.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Emigration Sentence template

Post by ColinMc » 28 Mar 2020 10:24

As far as I can see also, the Solution outlined above for the Sentence Template is not working in the Fact Tab override template for the Principal.

Emigrated <from {%FACT.PLAC:SHORT%}> <to {%CUR_PRIN.EMIG._PLAC:SHORT%}> <with {other=principal,emigrant}>

in my example this is just generating "Emigrated from London." in the FactTab. So Place 2 is not getting picked up again.

I'm reluctant to assume it is a bug without someone checking, but it looks like the same/similar issue.


Colin
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

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

Re: Emigration Sentence template

Post by LornaCraig » 28 Mar 2020 11:13

This is very odd. I have never used Witnesses for Emigration events so I have never changed any defaults for the Witness statement. On first checking I saw that there was indeed an override set to

Emigrated <from {_place}> <to {_place2}> <with {other=principal,emigrant}>

just as you say. However I then clicked Installation settings in the Edit Role - Advanced Features window and it disappeared! This was on my laptop but to check that I wasn't going mad I did the same on my deskyop PC. The same thing happened.

However the blank override template doesn't reliably 'stick' - sometimes it reappears. Surely this is a bug.
Lorna

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Emigration Sentence template

Post by ColinMc » 28 Mar 2020 12:08

I have not used a Witness for emigration either. In fact I was on the point of deleting the Witness Role while I was experimenting with it.

Still puzzled why it would be set anyway?
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

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

Re: Emigration Sentence template

Post by tatewise » 28 Mar 2020 12:13

Firstly, let me clear up a few misunderstandings, and later will confirm some related bugs.
Some of it is explained in how_to:narrative_report_fact_sentence_templates|> Narrative Report Fact Sentence Templates.

There are several quite independent templates for different purposes:-
  • The Fact Definition dialogue Sentence Template defines the Narrative Report sentence for the Principal person
  • Via its Advanced... button it has two optional Template settings for the Principal, often undefined so defaults apply, and nothing to do with Narrative Report sentences nor the Sentence box on the Facts tab:
    • Override Template for Facts tab Listings applies to the top pane Fact list blue bullet entry
    • Override Template for Record Window Listings applies to the Records Window and All tab
  • The Edit Role dialogue Witness Sentence Template defines the Narrative Report sentence for the Fact Witness
  • Via its Advanced... button it has an Override Template for Facts tab Listings that applies to the top pane Fact list blue arrow entry for a Fact Witness and nothing to do with Narrative Report sentences
  • (There is no override for Records Window or All tab beacuse Fact Witnesses never appear there)
The expression <from {%FACT.PLAC:SHORT%}> <to {%CUR_PRIN.EMIG._PLAC:SHORT%}> works in all cases except in both the Override Templates just for the Principal person where the to 2nd place part is blank.
I've tried variations on that theme using FACT._PLAC and {=CombineText(...)} instead of <...> but nothing works so that scenario needs to be added to the bug report to Calico Pie.

Finally, the Installation Settings button in both the Advanced... dialogues clears the Templates as expected.
I have never noticed them reappearing.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Emigration Sentence template

Post by ColinMc » 28 Mar 2020 12:14

Just spotted another variation.

I had reset to Installation settings on the Fact Definition screen. If you reset it here, the override returns.

If you reset it from the Edit Role - Advanced Features as Lorna did, it does not.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Re: Emigration Sentence template

Post by davidf » 28 Mar 2020 12:17

ColinMc wrote:
28 Mar 2020 12:08
Still puzzled why it would be set anyway?
Bit like Neighbours on Census records?

You scan the image and you see names that "ring a bell" but you can't see the connection, so you set them as Witnesses (name only) to resolve later?

Another example of whether you are using FH as a melting pot for all your data and queries or as a pure database to drive automated output (Websites/CD/Books etc.)?
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)

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

Re: Emigration Sentence template

Post by tatewise » 28 Mar 2020 12:22

Please read my long earlier posting that explains the purpose of each of the Template options.

The Installation Settings button on the Fact Definition screen should clear any Override Templates.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

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

Re: Emigration Sentence template

Post by LornaCraig » 28 Mar 2020 12:53

The Installation Settings button on the Fact Definition screen should clear any Override Templates.
Yes, but there is an inconsistency. If you reset Installation settings on the Edit Role - Advanced Features screen the override disappears, but as Colin says, if you reset Installation Settings on the Fact Definition screen it reappears. The two are in conflict.
Lorna

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Emigration Sentence template

Post by ColinMc » 28 Mar 2020 13:07

Sorry, but you are conflating the two problems here.

The first point is related to the use of Short place name for the two places in the Emigration fact.

You have confirmed that the bug report should be extended to confirm the issue in the overide for the principal fact. I will report that as well. That part of the discussion is resolved.



I then extended this discussion, and in hindsight, I should have posted this as a separate topic.

My query now refers to the use of Override texts in the default settings for Fact Roles.

Setting Installation Settings from the Fact Definition Window re-instates an overide text in the Fact Witness Role.

Lorna has in all probability confirmed the situation with her check. I've just re-tested it, and it is adding back in an override text in The Witness role.

I believe that the developer should never have an override which cant be seen in "normal" use by most users. and I don't understand why it should be there in the first place.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

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

Re: Emigration Sentence template

Post by tatewise » 28 Mar 2020 14:46

I agree the Installatioin Settings buttons in the Fact Definition dialogue and both Advanced Features dialogues are inconsistent and counteract each other for some facts.

That is quite widespread and impacts Emigration, Immigration, and Residence, but Residence is the only one I have discovered that has a non-blank Fact Definition - Advanced Features Principal Override Template.

However, I think I may have a rational explanation for why some Override Template settings are not a blank default.
The Edit Role - Advanced Features blank setting Fact Witness default Override Template uses:
<Past Tense><Fact Label> of <Principal> and that works OK in many cases but not all.
e.g.
For a Death Witness is displays Witness at Death of Tom Smith which is fine.
For Emigration Witness it displays Emigrant Emigration of Tom Smith which is not.
For Residence Witness it displays Resident Residence of Tom Smith which is not.

Those last two cannot be improved much by changing the Past Tense or Fact Label.
So I suspect Calico Pie decided to simply update the Fact Set definitions for those Override Templates since rescripting the default program code would be much more complex.
In doing so they remembered to make one Installation Settings button reset correctly but overlooked the others.
So that oversight needs to be reported separately to Calico Pie.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Emigration Sentence template

Post by ColinMc » 28 Mar 2020 16:39

I have reported the inconsistency as a bug.

I have also registered the issue that there should be no Override Templates included at installation, and that if an override is in use, it should be highlighted clearly on the relevant screen.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Emigration Sentence template

Post by ColinMc » 01 Apr 2020 08:40

I have had a response from Calico Pie regarding the initial issue of a short form for place. Their solution seems to work

The FACT tag only allows reference to tags which are common to all fact types - which _PLAC is not. So _PLAC is not supported as a sub-tag of FACT in a data reference. I see from the fhug discussion that you wanted a short form for 'place' in <to {_place2}> in a sentence template. Try this:

<to {=GetFieldText(%FACT%,"%~._PLAC:SHORT%")}>

A simpler solution would be desirable so we have logged this issue in any case. Thank you for reporting it.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

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

Re: Emigration Sentence template

Post by tatewise » 01 Apr 2020 09:18

Excellent, that kind of solution has cropped up before, but I don't always recall the various alternative workarounds.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply