Narrative Report Fact Sentence Templates

Introduction

These specify the wording for facts in Narrative Reports and elsewhere. They are defined in the Tools > Fact Types dialogues, as documented at Fact Definition Dialog. They can also be defined for specific Facts in the Property Box Dialogue Facts tab by editing the Sentence field. This article gives an overview of how and where to view and edit them, and includes some examples of what can be done.

Finding Sentence Templates

Sentence Templates can be found in various dialogues to define either default fact sentences or specific fact sentences.

Default Fact Definitions

These Sentence Templates definitions are applied by default to all Facts of the same type.

To view or modify them:

  • Use Tools > Fact Types to access the Fact Type dialogue.
  • Click the Edit… button to open the Fact Definition dialog.
  • The Help button offers advice about the mandatory Sentence Template field.

To view or modify Witness Sentence Templates ([fH6 and above):

  • In the Fact Definition dialogue, click the Witness Roles button
  • Select a Role and use the Edit or Add button, to open the Edit/New Role dialogue.
  • The Help button in that dialog has advice about the Witness Sentence Template field.

In any of those dialogues, click the Advanced button to reveal Override Templates for the Property Box Dialogue Facts tab and the Records Window. (An Override Template, if it exists, replaces the the default template in the chosen location).

The <<Insert Code button offers the same features in all the above dialogues, as explained later.

Use the Installation Settings button or Old Versions button to restore earlier templates.

See the Alternative Sentence Templates below for examples of various sentence styles.

Tip: Such fact definition scenarios could include creating a fact list style or a foreign language style as alternatives to the default style. If you intend to extensively modify the default Sentence Templates definitions for many Facts, it is advisable to use the Fact Sets button and Clone the chosen fact set, especially the Standard set. That allows any alternative definition styles to be easily swapped via the Fact Set priority order. Only the highest priority Fact Set will list its definitions, and its clones will appear to have no Facts unless Show Hidden is ticked to reveal their eclipsed/disabled definitions.

Specific Fact Sentences

These Sentence Templates definitions apply to just one specific Fact sentence, to override the default.

In the Property Box Dialogue Facts tab, select a Fact to display its Sentence template field.

Since ƒh V6, in the Facts tab, right-click a Fact and choose Witnesses. Select a Witness to display that Witness Sentence template field, and click Helpfor advice.

If the field background is beige, then the default template applies. Click on the field to edit the template for that specific instance, and the background changes to white. Unfortunately, there is no <<Insert Code button to help compose the template. To restore the default template, delete the entire contents of the field.

Standard Template Codes

Most of the Standard Codes are simple names enclosed in curly brackets, such as {individual} or {date} that represent the Name of Individual or the Date field respectively. They can be inserted from the <<Insert Code button, and for full details choose the How to Use Advanced Features option and scroll up the Help page. If the Fact field associated with a Code is empty, then nothing appears in the Sentence.

ƒh V6 added new codes for witnesses and formatting. The Witness Role Codes apply to witnesses associated with a fact, the Formatting Codes of <br>and <para> force a New Line or New Paragraph, and the special {blank} code inhibits the sentence completely. See the Alternative Sentence Templates below for examples of their use.

Advanced Template Codes

Most of the Advanced Codes are not available from the <<Insert Code button, so for full details choose the How to Use Advanced Features option and scroll down the Help page. Such Codes must be edited manually into the Sentence Template taking care to avoid syntax errors (which are evident because the Code appears in the Sentence instead of the desired text).

The {date} code automatically adds prefixes and other elements to make the Date fit into the Sentence, and is unique in allowing Date Qualifiers such as {date:YEAR} but they inhibit the automatic prefixes, etc.

It is often useful to add a prefix/suffix to a Code such as at {address}, but if the Fact field is empty the prefix/suffix still appears, unless it is made conditional by enclosing the structure in angle brackets such as <at {address}, > . This is similar to the {=CombineText("at ",%FACT.ADDR%,", ",,)} function. See the Alternative Sentence Templates below for examples of this.

Data References and Functions

Since ƒh V6 both Data References and Functions can be inserted into Sentence Templates within curly brackets such as {%FACT.PLAC>LATLONG%} or {=TextPart(%FACT.PLAC%,1,2,TIDY)}.

Use the << Insert Code> Data Reference option to open the Data Reference Assistant dialogue that helps compose the Codes. There are special Contextual Data References that provide links to the Individuals and Witnesses associated with a Fact.

Functions must be edited manually into the Sentence Template taking care to avoid syntax errors, which are evident because the Function Code appears in the Sentence instead of the desired text.

Unfortunately, Standard Template Codes are not recognised within Functions so {=TextIf(Exists({date}),{date}," at unknown date")} is not possible as explained in Wish List Ref 546 Enhanced use of Narrative Template Codes. However, it may be possible to substitute a Data Reference such as %FACT.NOTE2% instead of {note}.

Custom Fact Fields

Custom fields cannot be added to Facts, and even if they could, when exported in GEDCOM files they would not be recognised by other genealogy products.

There are techniques for Entering Standard and Custom Fields for Facts that cater for any extra fields that may be required.

Alternative Sentence Templates

The default Sentence Templates are often repetitive and in a single paragraph. The following alternatives offer other sentence styles, typically using a new line <br> or paragraph <para> code. Each Template can be pasted into the Sentence Template field of any appropriate fact to yield a Sentence similar to the examples shown below.

Tabulated Facts

This mimics the Individual Summary Report tabulated style, and can be applied to most fact and witness templates. Explicit tab & space characters can follow the colon ( : ) on each new line, such that the text is neatly tabulated in the report. The number of tab characters may need adjusting for each line, or could be omitted altogether. The new paragraph <para> code is best located at the end of every template.

Template:
{label}: {date:Compact} {age} {value} {place}.<<br>Address: {address}.><<br>Notes: {note}><para>

Sentence:

Baptism: Jun 27 in Cheltenham
Address: The Priory Church, Tonley, Cheltenham
Notes:   Anthony had 4 god-parents.

Tip: To enter a tab character into a Sentence Template box use the CTRL+TAB keys.

Tip: The Birth Event should add Name: {individual}<br> at the very start of the template.

Tip: Add other data between Address: and Notes: using the format <<br>Label: {code}.>

e.g.
<<br>Cause: {cause}.>
<<br>Witness: {role=witness}.>
<<br>Minister: {role=minister}.>

Census Event

This style caters for the 1939 National Register and relies on the full address being in the Place field.

Template:
{individual} appeared in the
{=TextIf(GetDisplayText(%FACT.DATE%,min) = "29 September 1939","National Register","Census")}
{date} residing at {_place} {age}

Sentence:
He appeared in the Census on 31 March 1901 residing at 8 Main St, Oxford, England aged 48.
Sentence:
He appeared in the National Register on 29 September 1939 residing at 5, High Rd, Oxford, England.

Similarly for the Census (family) Event:

Template:
{couple} appeared in the
{=TextIf(GetDisplayText(%FACT.DATE%,min) = "29 September 1939","National Register","Census")}
{date} residing at {_place} {their ages}

Sentence:
They appeared in the Census on 31 March 1901 residing at 8 Main St, Oxford, England when he was 34 and she was 31.

Birth & Baptism Events

These are variants of the standard sentences to add the relationship to the File Root person.

The relationship is excluded if the person is the File Root, and also if a child of the File Root as those sentences already mention their son/daughter relationship by default.

Template:
{individual} was born< {date}>< {place}>< ({age})>{=CombineText( Text( " and is " . FileRoot() . "'s "),
TextIf(IsSameItem(FileRoot(),%CUR_PRIN%) or IsSameItem(FileRoot(),%CUR_PRIN.~FATH>%) or
IsSameItem(FileRoot(),%CUR_PRIN.~MOTH>%), "", Relationship(FileRoot(),%CUR_PRIN%,TEXT,1) ) )}
Sentence:
He was born on 1 May 1900 in London and is John Smith's grandfather.

This Baptism Event template adds the relationship when no Birth Event.

Template:
{individual} was baptised< {date}>< {place}>< {age}>{=CombineText( Text( " and is " . FileRoot() . "'s "),
TextIf(IsSameItem(FileRoot(),%CUR_PRIN%) or IsSameItem(FileRoot(),%CUR_PRIN.~FATH>%) or
IsSameItem(FileRoot(),%CUR_PRIN.~MOTH>%) or Exists(%CUR_PRIN.BIRT%), "", Relationship(FileRoot(),%CUR_PRIN%,TEXT,1) ) )}.
< The godparents were {role(plural)=godparent}.>< The godparent was {role(single)=godparent}.>
< The ceremony was conducted by {role=minister}.>< The ceremony was conducted by {role=priest}.>}
Sentence:
He was baptised on 3 June 1900 in London and is John Smith's grandfather.

Burial Event

This is a variant style of sentence to add interest.

Template:
Following {his/her} death, {individual} was buried {date} {place} {age}<br>
Sentence:
Following his death, he was buried on 23 March 1900 in Bristol, England aged 96.

Tip: Note that {date} {place} {age} does not need to use < {date}>< {place}>< {age}> because adjacent or trailing spaces resulting from empty fields are automatically pruned.

 

Last update: 22 Feb 2024