* Customise Occupation 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
Stephen
Silver
Posts: 7
Joined: 18 Jan 2018 20:55
Family Historian: V6
Location: Newcastle, NSW, AUS

Customise Occupation Sentence Template

Post by Stephen » 25 Mar 2018 18:24

Hello

I am contacting the forum in the hope of some help with reworking/customising a sentence template for the Occupation Attribute. I have made an extensive search of the forum and knowledge base and have read the Knowledge base - Narrative Report Fact Sentence Templates and the links from there to other pages. However, my query has not been answered as far as I can see, so I'm hoping for some help or clarification with this matter.

According to the help menu the Template Code {a/an value} does this:
"Fact Value (with a/an prefix)
Code: {a/an value}
Only used with attributes. Inserts the fact value prefixed by 'a' if the value begins with a consonant (e.g. 'a sailor') or by 'an' if the value begins with a vowel (e.g. 'an airman')."

I have the following data associated with an Occupation attribute, but my query would apply to any such Occupation 'fact'.

Occupation: Labourer
Date: frm 1945 to 1951 Age: -
Place: Wickham, New South Wales, Australia
Address: James Tickle & Sons Pty Ltd Foundry Specialists, Cnr Albert & Railway & Foundry Streets
Note: -

The default Occupation sentence template is:
{date} {individual} was {a/an value} {place} {age}, which produces the sentence;
From 1945 to 1951 he was a Labourer in Wickham, New South Wales, Australia.

My preferred sentence template is to have the Occupation value in lower case, yet preceded by the relevant 'indefinite article' (ie. 'a' or 'an') and, in an attempt to achieve this, I have gotten to this point:
{date} {individual} was {=ToLower(%CUR_PRIN.OCCU[1]%)}< with {=TextPart(%FACT.ADDR%,1)}> {place} {age}, which produces the following sentence (however, without the 'a');
From 1945 to 1951 he was labourer with James Tickle & Sons Pty Ltd Foundry Specialists in Wickham, New South Wales, Australia.

I have experimented with <a/an {=ToLower(%CUR_PRIN.OCCU[1]%)}> and a number of other combinations which do not achieve what I am looking for.

Now I am aware that Template codes don't work with functions and also that I could just enter the value in lower case with associated 'article' to begin with (eg. a labourer OR an accountant), but I have read on numerous genealogy sites that facts should be entered exactly as they are documented in the source (which in this case is 'Labourer').

So my question is; Is there a way to insert the fact value prefixed by 'a' if the value begins with a consonant (e.g. 'a sailor') or by 'an' if the value begins with a vowel (e.g. 'an airman') and get the value to use lower case? or is what I have the best I can do?

Any thoughts or help would be appreciated.

Regards
Steve

User avatar
AdrianBruce
Megastar
Posts: 1961
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Customise Occupation Sentence Template

Post by AdrianBruce » 25 Mar 2018 19:09

Stephen wrote:... I have read on numerous genealogy sites that facts should be entered exactly as they are documented in the source (which in this case is 'Labourer'). ...
I shall, I'm afraid, side-step your question of how to prefix with an "a" or "an" and gently encourage you to question "the rules".

The idea that facts should be documented exactly as in the source, applies, I suggest, to a transcription of the source, as it appears in the source-record. Thereafter, all bets are off! What you are entering into your facts for an individual, particularly if you are going to use narrative sentences, are conclusions, not transcriptions from sources. Transcripts, as I say, should be confined to source-records. (Doesn't mean that you can't use them elsewhere - just that it's not mandatory).

It's all too easy for me to construct a string of theoretical words that might be used in source records instead of "Labourer" - e.g. "Lab'r", "laborer" (yes, Victorians did seem to use this spelling), "Lab", etc. It would seem overkill to enter every single one of those, with its own spelling and case, in its own fact, particularly if you're going to produce a narrative report, if just one fact, with a date range, would do the same job.

If it was me (and this is what I do) the exact transcriptions go into source-records and sometimes into "Text From Source" on the yellow pane. The value, I would set to "labourer". Lower case, no "a/an". Or it would get set to "airman". Lower case, no "a/an". That way the default narrative sentence will stick the "an" into the correct place.

In summary, conclusions are not the same as source transcripts, so the same rules do not apply.
Adrian

User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Re: Customise Occupation Sentence Template

Post by rodit » 26 Mar 2018 04:23

I treat occupations in a similar way. Enter Occupation as 'labourer" and reports show "...he was a labourer...".
Text from source is as per document (census, Birth, baptism, etc. records), as mentioned by Adrian.
Roger
BTW I lived in Newcastle until 2000

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

Re: Customise Occupation Sentence Template

Post by tatewise » 26 Mar 2018 16:19

I agree with Adrian and Roger.
Put the exact wording in the Text From Source transcript.
Use a 'normalised' form of the occupation in Occupation attributes, so that all forms & spellings of labourer are recorded as labourer (so you could produce statistical reports on how many ancestors were in each occupation).
Anyway, what if you found several Source documents for the same date all giving slightly different forms of the same occupation? e.g. a burial record and an obituary.

It is NOT possible to determine whether the first letter of the occupation is a vowel or a consonant with Sentence Templates.
Therefore, it is NOT possible to set the prefix to an or a automatically.

If you are determined to achieve your original objective then the only solution is to include the prefix an or a somewhere in the Occupation fields, e.g. add a Descriptor or Cause field via the All tab to hold the indefinite article.
Then the relevant part of the Sentence Template could be:
was {%FACT.TYPE%} {=ToLower(%FACT%)}
or
was {cause} {=ToLower(%FACT%)}

BTW: {=ToLower(%CUR_PRIN.OCCU[1]%)} does not work, as it will always return the 1st Occupation value for every Occupation attribute Sentence.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply