{"id":12480,"date":"2023-01-10T16:51:28","date_gmt":"2023-01-10T16:51:28","guid":{"rendered":"https:\/\/fhug.org.uk\/kb\/?post_type=kb_article&#038;p=12480"},"modified":"2023-01-13T15:16:32","modified_gmt":"2023-01-13T15:16:32","slug":"entering-standard-and-custom-fields-for-facts","status":"publish","type":"kb_article","link":"https:\/\/www.fhug.org.uk\/kb\/kb-article\/entering-standard-and-custom-fields-for-facts\/","title":{"rendered":"Entering Standard and Custom Fields for Facts"},"content":{"rendered":"<p>When using most Facts, the standard Fields of Age, Date, Place, Address &amp; Note are usually sufficient but sometimes extra fields are desirable. Those standard fields are described in <a href=\"https:\/\/fhug.org.uk\/kb\/kb-article\/entering-ages\/\" target=\"_blank\" rel=\"noopener\">Entering Ages<\/a>, <a href=\"https:\/\/fhug.org.uk\/kb\/kb-article\/entering-dates\/\" target=\"_blank\" rel=\"noopener\">Entering Dates<\/a> &amp; <a href=\"https:\/\/fhug.org.uk\/kb\/kb-article\/sort-dates\/\" target=\"_blank\" rel=\"noopener\">Sort Dates<\/a> and\u00a0<a href=\"https:\/\/fhug.org.uk\/kb\/kb-article\/working-with-places-and-addresses-for-new-users\/\" target=\"_blank\" rel=\"noopener\">Working with Places and Addresses<\/a>.<\/p>\n<p>However, when using standard Facts or creating custom Facts, there may be a desire to add custom fields to hold particular data.<\/p>\n<p>Custom fields cannot be added to Facts, and even if they could, when exported in a GEDCOM file they would not be recognised by other genealogy products. This article explains some alternative techniques.<\/p>\n<h2>Basic Techniques<\/h2>\n<p>When designing a Custom Fact and just one extra field is needed, then instead of an Event try using an Attribute, which offers a value field after its name in the Facts tab, and is referenced by the <code>{value}<\/code> code in its Sentence Template (see standard Attributes such as Occupation and Property). In practice, Events and Attributes are identical apart from the value field. There are no significant known issues when exporting to other products by reclassifying Events as Attributes. See <a href=\"https:\/\/fhug.org.uk\/kb\/kb-article\/narrative-report-fact-sentence-templates\/\" target=\"_blank\" rel=\"noopener\">Narrative Report Fact Sentence Templates<\/a> for further details.<\/p>\n<p>In addition to the Age, Date, Place, Address and Note fields, there are other standard fields available via the <em>All<\/em> tab of the Property Box including:<br \/>\nCause (CAUS), Descriptor (TYPE), Email (EMAIL), Fax (FAX), Phone (PHON), Web Site (WWW), Responsible Agency (AGNC) &amp; Religious Affiliation (RELI).<br \/>\nThey can be used to hold appropriate information and referenced using <code>{cause}<\/code> or <code>{%FACT.CAUS%}<\/code>, <code>{%FACT.TYPE%}<\/code>, etc.<br \/>\nThe Cause field is particularly useful because it automatically appears in Reports as illustrated later.<\/p>\n<p>The Emigration and Immigration events have additional To and From (_PLAC) fields and users often wonder if those fields can be used in other facts. They cannot, but labelled Note meta-fields can be used instead.<\/p>\n<h2>Labelled Note Meta-fields<\/h2>\n<p>A popular method of adding custom fields uses labelled meta-fields in the Note box, and is illustrated here using a Baptism Event:<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-12481 lazyload\" title=\"Baptism labelled Note meta-fields\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Baptism-labelled-Note-image-300x135.png\" alt=\"Baptism labelled Note meta-fields\" width=\"600\" height=\"270\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Baptism-labelled-Note-image-300x135.png 300w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Baptism-labelled-Note-image-150x68.png 150w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Baptism-labelled-Note-image.png 511w\" data-sizes=\"(max-width: 600px) 100vw, 600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 600px; --smush-placeholder-aspect-ratio: 600\/270;\" \/><\/p>\n<p>The following Function Codes in the <a href=\"https:\/\/fhug.org.uk\/kb\/kb-article\/narrative-report-fact-sentence-templates\/\" target=\"_blank\" rel=\"noopener\">Narrative Report Fact Sentence Templates<\/a> would compose the Sentence text:<\/p>\n<p><code>{individual} was baptised {date} {place} {age}&lt; by the {=GetLabelledText(%FACT.NOTE2%,\"Minister: \")}&gt;&lt; for a fee of {=GetLabelledText(%FACT.NOTE2%,\"Charge: \")}&gt;<\/code><\/p>\n<p>Each labelled meta-field can be included or excluded in any combination desired.<\/p>\n<p>This not only allows the details to be exported satisfactorily in GEDCOM files, but also allows other Note text not required in the Sentence, unlike the <code>{note}<\/code> code that would include it all.<\/p>\n<p>It is advisable to enclose the meta-fields in <a href=\"https:\/\/www.family-historian.co.uk\/help\/fh7\/hh_start.htm#privatenotes.html\" target=\"_blank\" rel=\"noopener noreferrer\">Private Notes<\/a> privacy <strong>[[<\/strong> brackets <strong>]]<\/strong> so the fields or the brackets can be excluded from or included in Reports by adjusting the Options. Those privacy <strong>[[<\/strong> brackets <strong>]]<\/strong> also exclude the fields from Note text produced by the <code>{note}<\/code> code.<\/p>\n<p>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> dialogue, <em>Edit&#8230;<\/em> definition, there is a handy feature via the <em>Advanced&#8230;<\/em> button that offers an <em>Auto-Create Note<\/em> box that can hold the meta-field Note labels, so they automatically get created whenever that Fact is added. To start each label on a new line use <code>Ctrl+Enter<\/code> to insert a line break.<\/p>\n<h2>Source Note Field<\/h2>\n<p>Alternatively, the Source Note field <code>%FACT.SOUR2%<\/code> can be used in much the same way but rather less obtrusively. It is a local Note that appears in the yellow <em>Sources For<\/em> pane, but is nothing to do with Source records. The way to add a Source Note is via the <em>All<\/em> tab in an Individual\u2019s Property Box. Right-click the Fact and choose <em>Add Source Note<\/em> in <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span>7 or <em>Add Source<\/em> and then <em>Add Source Note to this Record<\/em> in earlier <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> versions. Add the text to the Source Note and it will appear in the <em>Sources For<\/em> pane. To edit the text use the <em>All<\/em> tab again and expand the Fact to reveal the <em>Source Note<\/em> box.<\/p>\n<p>When exported to other products there is a small risk that Source Notes may get converted to Source Citation Records.<\/p>\n<h2>Show Fact Fields in the Property Box<\/h2>\n<p>As explained above, a labelled meta-field is visible in the Note box and in the Sentence box when the Fact is selected.<\/p>\n<p>Any field can be included in the Facts list at the top of the <em>Facts<\/em> tab so it is visible even when the Fact is not selected.<br \/>\nThe custom fact <em>Flew from<\/em> illustrates this feature by adding a labelled Note meta-field <em>To: Glasgow, Scotland<\/em> second Place (see Emigration &amp; Immigration events) and on the <em>All<\/em> tab by adding a <em>Cause: by hot-air balloon<\/em> field.<br \/>\nUse <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>, select the Fact, click the <em>Edit&#8230;<\/em> button, then the <em>Advanced&#8230;<\/em> button and enter the required templates.<\/p>\n<p><em>Summary Template:<\/em> <code>Flew from {_place}&lt; to {=GetLabelledText(%FACT.NOTE2%,\"To: \")}&gt; {cause}<\/code><br \/>\n<em>Override Template:<\/em> <code>Flew {date} from {_place}&lt; to {=GetLabelledText(%FACT.NOTE2%,\"To: \")}&gt; {cause}<\/code><\/p>\n<p>Examples of the Fact Types dialogue, and the Property Box <em>Facts<\/em> tab and <em>All<\/em> tab are illustrated below.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-12482 lazyload\" title=\"Fact Definition - Advanced Features\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-Advanced-300x147.png\" alt=\"Fact Definition - Advanced Features\" width=\"800\" height=\"391\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-Advanced-300x147.png 300w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-Advanced-150x73.png 150w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-Advanced-768x375.png 768w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-Advanced.png 1001w\" data-sizes=\"(max-width: 800px) 100vw, 800px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 800px; --smush-placeholder-aspect-ratio: 800\/391;\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-12484 lazyload\" title=\"Facts tab\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-Facts-tab-300x202.png\" alt=\"Facts tab\" width=\"600\" height=\"404\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-Facts-tab-300x202.png 300w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-Facts-tab-150x101.png 150w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-Facts-tab.png 675w\" data-sizes=\"(max-width: 600px) 100vw, 600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 600px; --smush-placeholder-aspect-ratio: 600\/404;\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-12483 lazyload\" title=\"All tab\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-All-tab-300x116.png\" alt=\"All tab\" width=\"550\" height=\"214\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-All-tab-300x116.png 300w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-All-tab-150x58.png 150w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-All-tab.png 564w\" data-sizes=\"(max-width: 550px) 100vw, 550px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 550px; --smush-placeholder-aspect-ratio: 550\/214;\" \/><\/p>\n<p>Most of the other codes and functions are supported similarly to Sentence Templates. So standard fields such as Cause &amp; Descriptor mentioned above can be displayed using the codes <code>{cause}<\/code> or <code>{%FACT.CAUS%}<\/code>, <code>{%FACT.TYPE%}<\/code>, etc.<\/p>\n<p>A corollary to this technique is to add a symbol to indicate whether the Fact has a Source Citation or not. To do that start the <em>Summary Template<\/em> with the following expression which tests if a Source link exists:<br \/>\n<code>{=TextIf(%FACT.SOUR%,\"\u00a7\",\"\u2013\")}<\/code><br \/>\nwhere <code>\u00a7<\/code> is the Section Sign UTF+00A7 and <code>\u2013<\/code> is the En Dash UTF+2013 which are both the same width so the Fact names are tidily aligned.<\/p>\n<h2>Show Fact Fields in Reports<\/h2>\n<p>The Sentence Template defines how fields appear in Narrative Reports and others that use Narrative style Sentences. The template can use the codes <code>{note}<\/code> and <code>{%FACT.NOTE2%}<\/code> to include Note text, and the Report Options include Event\/Attr Notes by default, but that option is inhibited fact by fact if the template codes are used to prevent duplicated Note text.<\/p>\n<p>Most other reports show Notes by default, but if the labelled Note is enclosed in privacy <strong>[[<\/strong> brackets <strong>]]<\/strong> it will be excluded unless the <em>Inc. [[private]] Notes<\/em> option is enabled.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-12485 lazyload\" title=\"Individual Summary Report\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-ISR-300x60.png\" alt=\"Individual Summary Report\" width=\"600\" height=\"121\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-ISR-300x60.png 300w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-ISR-150x30.png 150w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2023\/01\/Flew-from-ISR.png 611w\" data-sizes=\"(max-width: 600px) 100vw, 600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 600px; --smush-placeholder-aspect-ratio: 600\/121;\" \/><\/p>\n<p>The labelled Note does not have to be in privacy <strong>[[<\/strong> brackets <strong>]]<\/strong> but that may cause other problems when there is further Note text.<\/p>\n<p>An alternative is to create a 2nd local Note via the <em>All<\/em> tab and adjust the template expressions to support both the 1st and 2nd local Notes.<\/p>\n<p>Template expression: <code>&lt; to {=GetLabelledText(%FACT.NOTE2%,\"To: \")}&gt;&lt; to {=GetLabelledText(%FACT.NOTE2[2]%,\"To: \")}&gt;<\/code><\/p>\n<p>The only drawback is the 2nd local Note is not shown in the <em>Facts<\/em> tab Note box, although it is shown in the <em>Notes<\/em> tab, and can be shown elsewhere in the Property Box as explained above.<\/p>\n<h2>Summary Conclusions<\/h2>\n<p>If a Custom Fact needs just one extra field, then instead of an Event try using an Attribute, which offers the value field and <code>{value}<\/code> code.<\/p>\n<p>Consider using the standard Cause field and <code>{cause}<\/code> code available with every Fact and shown in Reports.<\/p>\n<p>If other fields are needed then a flexible option is to use labelled Note meta-fields available with every Fact and optionally shown in Reports.<\/p>\n<p>Finally, there are the standard <em>All<\/em> tab fields Descriptor, Email, Fax, Phone, Web Site, Responsible Agency, Religious Affiliation and Source Note.<\/p>\n","protected":false},"template":"","fh_version":[13,14,15,739],"skill_level":[18,17],"topic":[201],"class_list":["post-12480","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-facts"],"_links":{"self":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article\/12480","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=12480"}],"wp:term":[{"taxonomy":"fh_version","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/fh_version?post=12480"},{"taxonomy":"skill_level","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/skill_level?post=12480"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/topic?post=12480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}