{"id":11089,"date":"2023-01-10T18:58:41","date_gmt":"2023-01-10T18:58:41","guid":{"rendered":"https:\/\/fhug.org.uk\/kb\/?post_type=kb_article&#038;p=11089"},"modified":"2024-02-22T13:47:49","modified_gmt":"2024-02-22T13:47:49","slug":"narrative-report-fact-sentence-templates","status":"publish","type":"kb_article","link":"https:\/\/www.fhug.org.uk\/kb\/kb-article\/narrative-report-fact-sentence-templates\/","title":{"rendered":"Narrative Report Fact Sentence Templates"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>These specify the wording for facts in Narrative Reports and elsewhere. They are defined in the <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">Tools&nbsp&gt;&nbspFact&nbspTypes<\/a> dialogues, as documented at <a href=\"https:\/\/www.family-historian.co.uk\/help\/fh6\/hh_start.htm#factdefinitiondialog.html\" target=\"_blank\" rel=\"noopener noreferrer\">Fact Definition Dialog<\/a>. 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.<\/p>\n<h2>Finding Sentence Templates<\/h2>\n<glwrap>Sentence Templates<\/glwrap> can be found in various dialogues to define either default fact sentences or specific fact sentences.<\/p>\n<h3>Default Fact Definitions<\/h3>\n<p>These <glwrap>Sentence Templates<\/glwrap> definitions are applied by default to all Facts of the same type.<\/p>\n<p>To view or modify them:<\/p>\n<ul>\n<li>Use <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">Tools&nbsp&gt;&nbspFact&nbspTypes<\/a> to access the <em>Fact Type<\/em> dialogue.<\/li>\n<li>Click the <em>Edit&#8230;<\/em> button to open the Fact Definition dialog.<\/li>\n<li>The <em>Help<\/em> button offers <a href=\"https:\/\/www.family-historian.co.uk\/help\/fh6\/hh_start.htm#factdefinitiondialog.html\" target=\"_blank\" rel=\"noopener noreferrer\">advice<\/a> about the mandatory <em>Sentence Template<\/em> field.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"wp-image-11093 aligncenter lazyload\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/narrative_report_sentence_defaults.png\" alt=\"\" width=\"700\" height=\"502\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/narrative_report_sentence_defaults.png 900w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/narrative_report_sentence_defaults-300x215.png 300w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/narrative_report_sentence_defaults-150x108.png 150w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/narrative_report_sentence_defaults-768x550.png 768w\" data-sizes=\"(max-width: 700px) 100vw, 700px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 700px; --smush-placeholder-aspect-ratio: 700\/502;\" \/><\/p>\n<p>To view or modify Witness <glwrap>Sentence Templates<\/glwrap> ([fH6 and above):<\/p>\n<ul>\n<li>In the<em> Fact Definition<\/em> dialogue, click the Witness <em>Roles<\/em> button<\/li>\n<li>Select a Role and use the <em>Edit <\/em>or <em>Add<\/em> button, to open the <em>Edit\/New Role<\/em> dialogue.<\/li>\n<li>The <a href=\"https:\/\/www.family-historian.co.uk\/help\/fh6\/hh_start.htm#witnessesdialog.html\" target=\"_blank\" rel=\"noopener noreferrer\"><em>Help<\/em><\/a> button in that dialog has advice about the Witness Sentence Template field.<\/li>\n<\/ul>\n<p>In any of those dialogues, click the <em>Advanced<\/em> button to reveal <em>Override Templates<\/em> for the <em>Property Box Dialogue Facts<\/em> tab and the <em>Records Window<\/em>. (An Override Template, if it exists, replaces the the default template in the chosen location).<\/p>\n<p>The <em>&lt;&lt;Insert Code<\/em> button offers the same features in all the above dialogues, as explained later.<\/p>\n<p>Use the <em>Installation Settings<\/em> button or <em>Old Versions<\/em> button to restore earlier templates.<\/p>\n<p>See the<a href=\"#alternativesentencetemplates\"> Alternative Sentence Templates<\/a> below for examples of various sentence styles.<\/p>\n<p>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 <glwrap>Sentence Templates<\/glwrap> 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.<\/p>\n<h3>Specific Fact Sentences<\/h3>\n<p>These <glwrap>Sentence Templates<\/glwrap> definitions apply to just one specific Fact sentence, to override the default.<\/p>\n<p>In the Property Box Dialogue Facts tab, select a Fact to display its Sentence template field.<\/p>\n<p>Since <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> V6, in the Facts tab, right-click a Fact and choose Witnesses. Select a Witness to display that Witness Sentence template field, and click <a href=\"https:\/\/www.family-historian.co.uk\/help\/fh6\/hh_start.htm#witnessesdialog.html\" target=\"_blank\" rel=\"noopener noreferrer\">Help<\/a>for advice.<\/p>\n<p>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 &lt;&lt;Insert Code button to help compose the template. To restore the default template, delete the entire contents of the field.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-11099 aligncenter lazyload\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/narrative_report_sentence_specific.png\" alt=\"\" width=\"700\" height=\"303\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/narrative_report_sentence_specific.png 900w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/narrative_report_sentence_specific-300x130.png 300w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/narrative_report_sentence_specific-150x65.png 150w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/narrative_report_sentence_specific-768x332.png 768w\" data-sizes=\"(max-width: 700px) 100vw, 700px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 700px; --smush-placeholder-aspect-ratio: 700\/303;\" \/><\/p>\n<h2>Standard Template Codes<\/h2>\n<p>Most of the Standard Codes are simple names enclosed in curly brackets, such as <code>{individual}<\/code> or <code>{date}<\/code> that represent the Name of Individual or the Date field respectively. They can be inserted from the &lt;&lt;Insert Code button, and for full details choose the How to Use Advanced Features option and scroll up the <a href=\"https:\/\/www.family-historian.co.uk\/help\/fh6\/hh_start.htm#templatecodes.html\" target=\"_blank\" rel=\"noopener noreferrer\">Help<\/a> page. If the Fact field associated with a Code is empty, then nothing appears in the Sentence.<\/p>\n<span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> V6 added new codes for witnesses and formatting. The Witness Role Codes apply to witnesses associated with a fact, the Formatting Codes of <code>&lt;br&gt;<\/code>and <code>&lt;para&gt;<\/code> force a New Line or New Paragraph, and the special <code>{blank}<\/code> code inhibits the sentence completely. See the<a href=\"#alternativesentencetemplates\"> Alternative Sentence Templates<\/a> below for examples of their use.<\/p>\n<h2>Advanced Template Codes<\/h2>\n<p>Most of the Advanced Codes are not available from the &lt;&lt;Insert Code button, so for full details choose the How to Use Advanced Features option and scroll down the <a href=\"https:\/\/www.family-historian.co.uk\/help\/fh6\/hh_start.htm#templatecodes.html\" target=\"_blank\" rel=\"noopener noreferrer\">Help<\/a> page. Such Codes must be edited manually into the <glwrap>Sentence Template<\/glwrap> taking care to avoid syntax errors (which are evident because the Code appears in the Sentence instead of the desired text).<\/p>\n<p>The <code>{date}<\/code> code automatically adds prefixes and other elements to make the Date fit into the Sentence, and is unique in allowing Date Qualifiers such as <code>{date:YEAR} <\/code>but they inhibit the automatic prefixes, etc.<\/p>\n<p>It is often useful to add a prefix\/suffix to a Code such as <code>at {address}<\/code>, 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 &lt;<code>at {address}, &gt;<\/code> . This is similar to the <code>{=CombineText(\"at \",%FACT.ADDR%,\", \",,)}<\/code> function. See the <a href=\"#alternativesentencetemplates\">Alternative Sentence Templates<\/a> below for examples of this.<\/p>\n<h3>Data References and Functions<\/h3>\n<p>Since <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> V6 both Data References and Functions can be inserted into <glwrap>Sentence Templates<\/glwrap> within curly brackets such as <code>{%FACT.PLAC&gt;LATLONG%}<\/code> or <code>{=TextPart(%FACT.PLAC%,1,2,TIDY)}<\/code>.<\/p>\n<p>Use the &lt;&lt; Insert Code&gt; 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.<\/p>\n<p>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.<\/p>\n<p>Unfortunately, Standard Template Codes are <strong>not<\/strong> recognised within Functions so <code>{=TextIf(Exists({date}),{date},\" at unknown date\")}<\/code> is not possible as explained in <a href=\"http:\/\/www.fhug.org.uk\/wishlist\/wldisplay.php?wlwlref=546\">Wish List Ref 546 Enhanced use of Narrative Template Codes<\/a>. However, it may be possible to substitute a Data Reference such as <code>%FACT.NOTE2%<\/code> instead of <code>{note}<\/code>.<\/p>\n<h2>Custom Fact Fields<\/h2>\n<p>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.<\/p>\n<p>There are techniques for <a href=\"https:\/\/fhug.org.uk\/kb\/kb-article\/entering-standard-and-custom-fields-for-facts\/\" target=\"_blank\" rel=\"noopener\">Entering Standard and Custom Fields for Facts<\/a> that cater for any extra fields that may be required.<\/p>\n<h2>Alternative Sentence Templates<\/h2>\n<p>The default Sentence Templates are often repetitive and in a single paragraph. The following alternatives offer other sentence styles, typically using a new line <code>&lt;br&gt;<\/code> or paragraph <code>&lt;para&gt;<\/code> 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.<\/p>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h3>Tabulated Facts<\/h3><\/summary><div class=\"lightweight-accordion-body\"><p>This mimics the Individual Summary Report tabulated style, and can be applied to most fact and witness templates. Explicit tab &amp; 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 <code>&lt;para&gt;<\/code> code is best located at the end of every template.<\/p>\n<p>Template:<br \/>\n<code>{label}: {date:Compact} {age} {value} {place}.&lt;&lt;br&gt;Address: {address}.&gt;&lt;&lt;br&gt;Notes: {note}&gt;&lt;para&gt;<\/code><\/p>\n<p>Sentence:<\/p>\n<p><code>Baptism: Jun 27 in Cheltenham<\/code><br \/>\n<code>Address: The Priory Church, Tonley, Cheltenham<\/code><br \/>\n<code>Notes:\u00a0 \u00a0Anthony had 4 god-parents.<\/code><\/p>\n<p>Tip: To enter a tab character into a Sentence Template box use the CTRL+TAB keys.<\/p>\n<p>Tip: The Birth Event should add <code>Name: {individual}&lt;br&gt;<\/code> at the very start of the template.<\/p>\n<p>Tip: Add other data between Address: and Notes: using the format <code>&lt;&lt;br&gt;Label: {code}.&gt;<\/code><\/p>\n<p>e.g.<br \/>\n<code>&lt;&lt;br&gt;Cause: {cause}.&gt;<\/code><br \/>\n<code>&lt;&lt;br&gt;Witness: {role=witness}.&gt;<\/code><br \/>\n<code>&lt;&lt;br&gt;Minister: {role=minister}.&gt;<\/code><\/p>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h3>Census Event<\/h3><\/summary><div class=\"lightweight-accordion-body\"><p>This style caters for the 1939 National Register and relies on the full address being in the Place field.<\/p>\n<p>Template:<br \/>\n<code>{individual} appeared in the<\/code><br \/>\n<code> {=TextIf(GetDisplayText(%FACT.DATE%,min) = \"29 September 1939\",\"National Register\",\"Census\")}<\/code><br \/>\n<code> {date} residing at {_place} {age}<\/code><\/p>\n<p>Sentence:<br \/>\n<code>He appeared in the Census on 31 March 1901 residing at 8 Main St, Oxford, England aged 48.<\/code><br \/>\nSentence:<br \/>\n<code>He appeared in the National Register on 29 September 1939 residing at 5, High Rd, Oxford, England.<\/code><\/p>\n<p>Similarly for the Census (family) Event:<\/p>\n<p>Template:<br \/>\n<code>{couple} appeared in the<\/code><br \/>\n<code> {=TextIf(GetDisplayText(%FACT.DATE%,min) = \"29 September 1939\",\"National Register\",\"Census\")}<\/code><br \/>\n<code> {date} residing at {_place} {their ages}<\/code><\/p>\n<p>Sentence:<br \/>\n<code>They appeared in the Census on 31 March 1901 residing at 8 Main St, Oxford, England when he was 34 and she was 31.<\/code><\/p>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h3>Birth &amp; Baptism Events<\/h3><\/summary><div class=\"lightweight-accordion-body\"><p>These are variants of the standard sentences to add the relationship to the File Root person.<\/p>\n<p>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.<\/p>\n<p>Template:<br \/>\n<code>{individual} was born&lt; {date}&gt;&lt; {place}&gt;&lt; ({age})&gt;{=CombineText( Text( \" and is \" . FileRoot() . \"'s \"),<\/code><br \/>\n<code> TextIf(IsSameItem(FileRoot(),%CUR_PRIN%) or IsSameItem(FileRoot(),%CUR_PRIN.~FATH&gt;%) or<\/code><br \/>\n<code> IsSameItem(FileRoot(),%CUR_PRIN.~MOTH&gt;%), \"\", Relationship(FileRoot(),%CUR_PRIN%,TEXT,1) ) )}<\/code><br \/>\nSentence:<br \/>\n<code>He was born on 1 May 1900 in London and is John Smith's grandfather.<\/code><\/p>\n<p>This Baptism Event template adds the relationship when no Birth Event.<\/p>\n<p>Template:<br \/>\n<code>{individual} was baptised&lt; {date}&gt;&lt; {place}&gt;&lt; {age}&gt;{=CombineText( Text( \" and is \" . FileRoot() . \"'s \"),<\/code><br \/>\n<code> TextIf(IsSameItem(FileRoot(),%CUR_PRIN%) or IsSameItem(FileRoot(),%CUR_PRIN.~FATH&gt;%) or<\/code><br \/>\n<code> IsSameItem(FileRoot(),%CUR_PRIN.~MOTH&gt;%) or Exists(%CUR_PRIN.BIRT%), \"\", Relationship(FileRoot(),%CUR_PRIN%,TEXT,1) ) )}.<\/code><br \/>\n<code> &lt; The godparents were {role(plural)=godparent}.&gt;&lt; The godparent was {role(single)=godparent}.&gt;<\/code><br \/>\n<code> &lt; The ceremony was conducted by {role=minister}.&gt;&lt; The ceremony was conducted by {role=priest}.&gt;}<\/code><br \/>\nSentence:<br \/>\n<code>He was baptised on 3 June 1900 in London and is John Smith's grandfather.<\/code><\/p>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h3>Burial Event<\/h3><\/summary><div class=\"lightweight-accordion-body\"><p>This is a variant style of sentence to add interest.<\/p>\n<p>Template:<br \/>\n<code>Following {his\/her} death, {individual} was buried {date} {place} {age}&lt;br&gt;<\/code><br \/>\nSentence:<br \/>\n<code>Following his death, he was buried on 23 March 1900 in Bristol, England aged 96.<\/code><\/p>\n<p>Tip: Note that <code>{date} {place} {age}<\/code> does not need to use <code>&lt; {date}&gt;&lt; {place}&gt;&lt; {age}&gt;<\/code> because adjacent or trailing spaces resulting from empty fields are automatically pruned.<\/p>\n<\/div><\/details><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"template":"","fh_version":[13,14,15,739],"skill_level":[18,17],"topic":[104,201,61],"class_list":["post-11089","kb_article","type-kb_article","status-publish","hentry","fh_version-v4","fh_version-v5","fh_version-v6","fh_version-v7","skill_level-advanced","skill_level-intermediate","topic-customisation","topic-facts","topic-reports-and-books"],"_links":{"self":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article\/11089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article"}],"about":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/types\/kb_article"}],"wp:attachment":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/media?parent=11089"}],"wp:term":[{"taxonomy":"fh_version","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/fh_version?post=11089"},{"taxonomy":"skill_level","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/skill_level?post=11089"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/topic?post=11089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}