Customise Occupation Sentence Template
Posted: 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
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