* Custom Fact Fields

A place for completed suggestions/corrections.

Moderator: kb admin

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

Custom Fact Fields

Post by tatewise »

In Emigration Fact - Copying and Using Both Copies (21346) Helen suggested creating a KB topic on custom fields for facts.
I am open to suggestions for the title but intend to add the article to the Entering and Editing Data section for Facts.

Parts of the article are derived from the Narrative Report Fact Sentence Templates section Custom Fact Fields which could later be removed.

All comments are welcome on the draft article below before adding it to the KB.

Entering Standard and Custom Fields for Facts
Skill Level: Advanced and Intermediate FH versions: V4, V5, V6, and V7 In Topics: Facts 

When using most Facts, the standard Fields of Age, Date, Place, Address & Note are usually sufficient but sometimes extra fields are desirable. Those standard fields are described in Entering Ages, Entering Dates, Entering Sort Dates and Working with Places and Addresses.

However, when
using standard Facts or creating custom Facts, there may be a desire to add custom fields to hold particular data.

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.

Basic Techniques

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 {value} code in its Sentence Template (see standard Attributes such as Occupation and Property). There are no significant known issues when exporting to other products by reclassifying Events as Attributes. See Narrative Report Fact Sentence Templates for further details.

In addition to the Age, Date, Place, Address and Note fields, there are other standard fields available via the All tab of the Property Box including:
Cause (CAUS), Descriptor (TYPE), Email (EMAIL), Fax (FAX), Phone (PHON), Web Site (WWW), Responsible Agency (AGNC) & Religious Affiliation (RELI).
They can be used to hold appropriate information and referenced using {cause} or {%FACT.CAUS%}, {%FACT.TYPE%}, etc.
The Cause field is particularly useful because it automatically appears in Reports as illustrated later.

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.

Labelled Note Meta-fields

A popular method of adding custom fields uses labelled meta-fields in the Note box, and is illustrated here using a Baptism Event:

Baptism labelled Note image.png
Baptism labelled Note image.png (7.06 KiB) Viewed 2784 times

The following Function Codes in the Narrative Report Fact Sentence Templates would compose the Sentence text:

{individual} was baptised {date} {place} {age}
< by the {=GetLabelledText(%FACT.NOTE2%,"Minister: ")}>
< for a fee of {=GetLabelledText(%FACT.NOTE2%,"Charge: ")}>

Each labelled meta-field can be included or excluded in any combination desired.

This not only allows the details to be exported satisfactorily in GEDCOM, but also allows other Note text not required in the Sentence, unlike the {note} code that would include it all.

It is advisable to enclose the meta-fields in 'Private Note' privacy [[ brackets ]] so the fields or the brackets can be excluded from or included in Reports by adjusting the Options. Those [[ brackets ]] also exclude the fields from Note text produced by the {note} code.

In the Tools > Fact Types dialogue, Edit... definition, there is a handy feature via the Advanced... button that offers an Auto-Create Note 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 Ctrl+Enter to insert a line break.

Source Note Field

Alternatively, the Source Note field %FACT.SOUR2% can be used in much the same way but rather less obtrusively. It is a local Note that appears in the yellow Sources For pane, but is nothing to do with Source records. The way to add a Source Note is via the All tab in an Individual’s Property Box. Right-click the Fact and choose Add Source Note in FH7 or Add Source and then Add Source Note to this Record in earlier FH versions. Add the text to the Source Note and it will appear in the Sources For pane. To edit the text use the All tab again and expand the Fact to reveal the Source Note box.

When exported to other products there is a small risk that Source Notes may get converted to Source Citation Records.

Show Fact Fields in the Property Box

As explained above, a labelled meta-field is visible in the Note box and in the Sentence box when the Fact is selected.

Any field can be included in the Facts list at the top of the Facts tab so it is visible even when the Fact is not selected.
The custom fact Flew from illustrates this feature by adding a labelled Note meta-field To: Glasgow, Scotland second Place (see Emigration & Immigration events) and on the All tab by adding a Cause: by hot-air balloon field.
Use Tools > Fact Types, select the Fact, click the Edit... button, then the Advanced... button and enter the required templates.

Summary Template: Flew from {_place}< to {=GetLabelledText(%FACT.NOTE2%,"To: ")}> {cause}
Override Template: Flew {date} from {_place}< to {=GetLabelledText(%FACT.NOTE2%,"To: ")}> {cause}

Examples of the Fact Types dialogue, and the Property Box Facts tab and All tab are illustrated below.

Flew from.png
Flew from.png (423.58 KiB) Viewed 2784 times

Most of the other codes and functions are supported similarly to Sentence Templates. So standard fields such as Cause & Descriptor mentioned above can be displayed using the codes {cause} or {%FACT.CAUS%}, {%FACT.TYPE%}, etc.

Show Fact Fields in Reports

The Sentence Template defines how fields appear in Narrative Reports and others that use Narrative style Sentences. The template can use the codes {note} and {%FACT.NOTE2%} 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.

Most other reports show Notes by default, but if the labelled Note is enclosed in privacy [[ brackets ]] it will be excluded unless the Inc. [[private]] Notes option is enabled.

Flew from ISR.png
Flew from ISR.png (9.14 KiB) Viewed 2784 times

The labelled Note does not have to be in privacy [[ brackets ]] but that may cause other problems when there is further Note text.

An alternative is to create a 2nd local Note via the All tab and adjust the template expressions to support both the 1st and 2nd local Notes.

Template expression: < to {=GetLabelledText(%FACT.NOTE2%,"To: ")}>< to {=GetLabelledText(%FACT.NOTE2[2]%,"To: ")}>

The only drawback is the 2nd local Note is not shown in the Facts tab Note box, although it is shown in the Notes tab, and can be shown elsewhere in the Property Box as explained above.

Summary Conclusions

If a Custom Fact needs just one extra field, then instead of an Event try using an Attribute, which offers the value field and {value} code.

Consider using the standard Cause field and {cause} code available with every Fact and shown in Reports.

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.

Finally, there are the standard All tab fields Descriptor, Email, Fax, Phone, Web Site, Responsible Agency, Religious Affiliation and Source Note.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5510
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Custom Fact Fields

Post by ColeValleyGirl »

Looks good to me, Mike.
User avatar
AdrianBruce
Megastar
Posts: 2109
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Custom Fact Fields

Post by AdrianBruce »

1. Re "Custom Fact Fields" - it is not immediately clear whether this relates to fields for Custom Facts or Custom Fields for all facts.

Suggest ... "Adding Custom Fields to any Fact"

But am I doing my usual sin of writing too much?

2. Re Source Note Field - do we need to mention that this was part of the sourcing methods before the introduction of source-records and that exporting this into other software may therefore result in old fashioned source related interpretations?


3. Re if "just one extra field is needed, then instead of an Event try using an Attribute" - suggest add, as reassurance, that there are no known issues in any software with reclassifying events as attributes.

Other than those minor comments, I think I need to take your ideas about Override Templates, thank you, and see if they might solve some of my issues with hidden values (I use AGNC for employers in the OCCU fact and keep forgetting the exact values I use)
Adrian
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Custom Fact Fields

Post by tatewise »

Thanks for the comments Adrian.
  1. Actually it covers standard fields too that users may be unaware of, c.f. Value, Cause, Descriptor, etc...
    So what about Fact Standard and Custom Fields or Using Standard and Custom Fields with Facts
  2. How far are you going back? GEDCOM 5.5 had Source records and that is over 25 years old.
  3. Yes, I'll add something like that.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
AdrianBruce
Megastar
Posts: 2109
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Custom Fact Fields

Post by AdrianBruce »

tatewise wrote: 05 Jan 2023 19:09 ...
  • Actually it covers standard fields too that users may be unaware of, c.f. Value, Cause, Descriptor, etc...
    So what about Fact Standard and Custom Fields or Using Standard and Custom Fields with Facts ...
Re Lesser known standard fields - yes, that's very true... I think I'd go for Using Standard and Custom Fields with Facts (because it's got a verb in it...)

tatewise wrote: 05 Jan 2023 19:09 ...
  • How far are you going back? GEDCOM 5.5 had Source records and that is over 25 years old. ...
:) I've no idea how far back Source Records go but even 5.5.1 still has an explanation in it, that this is what systems did before they used Source Records. Once upon a time. Many years ago presumably. I just thought it worth forestalling anyone wondering what they should have been using it for.
Adrian
User avatar
Chrisv
Famous
Posts: 157
Joined: 18 Mar 2022 17:00
Family Historian: V7
Location: Savannah, GA, USA

Re: Custom Fact Fields

Post by Chrisv »

This is great!
It sums up all the previous discussions and ideas in a concise, easy to understand format for the different options available. And the illustrations really make a big difference in making it understandable for the less experienced users!
Thanks!
User avatar
cwhermann
Famous
Posts: 155
Joined: 20 Mar 2021 22:04
Family Historian: V7
Location: New Hampshire, US

Re: Custom Fact Fields

Post by cwhermann »

I am a relatively inexperience user of FH converting from RM and have been focused on cleaning up the source records and footnote templates, but cleaning up my RM facts are next on the list. Given that RM did not distinguish between events and attributes and allowed a description field (or FH {value} to be added to any fact, I think having this information in the knowledge base is fantastic. The flexibility of FH continues to amaze me.
As I read this, there were a couple items that were not clear to me.
Mike wrote:
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 {value} code in its Sentence Template, c.f. standard Attributes such as Occupation and Property. See Narrative Report Fact Sentence Templates for further details.
What is c.f. abbreviation for?

In the second example, I see the {cause} in the sentence template and I think it should be in the note field, but it is not clear where I would input the “in a hot air balloon” for {cause}. Is there something missing in the auto complete note field?
Curtis Hermann
FH 7.0.15
User avatar
ADC65
Superstar
Posts: 472
Joined: 09 Jul 2007 10:27
Family Historian: V7

Re: Custom Fact Fields

Post by ADC65 »

cwhermann wrote: 06 Jan 2023 00:31 What is c.f. abbreviation for?
"Compare", used to refer the reader to other material to make a comparison with the topic being discussed.
Adrian Cook
Researching Cook, Summers, Phipps and Bradford, mainly in Wales and the South West of England
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Custom Fact Fields

Post by tatewise »

In response to the comments, I have updated my original posting with text highlighted in blue.

Helen, I noticed that the Sort Dates article is not classified in the Facts Topic alongside Entering Dates and Entering Ages.
It would be useful to rename the article as Entering Sort Dates so it is listed alongside those other two and this new article Entering Standard and Custom Fileds for Facts.

Also, there is a typo in Help file (v7): Data Entry Assistant Dialog where Data should be Date
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5510
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Custom Fact Fields

Post by ColeValleyGirl »

tatewise wrote: 06 Jan 2023 12:22 Helen, I noticed that the Sort Dates article is not classified in the
Mike, it would be hopeless trying to manipulate article titles to influence their grouping, so we shouldn't try. For example, what if somebody decided to retitle "How to Enter a Cremation" to "Entering Cremations" for consistency?
Also, there is a typo in Help file (v7): Data Entry Assistant Dialog where Data should be Date
Fixed -- feel free to correct any other obvious typos that you find.
avatar
ColinMc
Superstar
Posts: 460
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Custom Fact Fields

Post by ColinMc »

This all made sense to me apart from one tiny bit.
It is advisable to enclose the meta-fields in privacy [[ brackets ]] to allow the fields or the brackets to be excluded from Reports and also the {note} code.
I wasn't sure exactly how this was to be read, but on my reading, I assumed that you meant the {note} code should be inside privacy brackets. If that is correct, then maybe that sentence could be re-worded as below.
It is advisable to enclose the meta-fields (and also the {note} code) in privacy [[ brackets ]] to allow the fields or the brackets to be excluded from Reports.
It would also help to explain that the fields need to (or should) be excluded as it ensures that there is no duplication of the info, as the relevant sentence will already be present. The explanation as it is currently could be read to imply that these "extra" bits of fact info (Minister & Charge) would be excluded completely from reports. Maybe also include the {note} code in the visual example and Sentence text illustrated.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Custom Fact Fields

Post by tatewise »

Helen, I think you missed my overriding point that the Sort Dates article is not classified in the Facts Topic at all.
It is classified in the Entering and Editing Data Topic but Sort Dates only apply to Facts just like Dates and Ages.
(Actually, they apply more so than Dates which can be entered elsewhere.)
If I looked in the Facts topic and saw how to enter Dates I would expect to find Sort Dates there too.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Custom Fact Fields

Post by tatewise »

ColinMc wrote: 06 Jan 2023 13:43
It is advisable to enclose the meta-fields in privacy [[ brackets ]] to allow the fields or the brackets to be excluded from Reports and also the {note} code.
I wasn't sure exactly how this was to be read, but on my reading, I assumed that you meant the {note} code should be inside privacy brackets.

It would also help to explain that the fields need to (or should) be excluded as it ensures that there is no duplication of the info, as the relevant sentence will already be present. The explanation as it is currently could be read to imply that these "extra" bits of fact info (Minister & Charge) would be excluded completely from reports. Maybe also include the {note} code in the visual example and Sentence text illustrated.
I had assumed that users probably understood how the privacy [[ brackets ]] worked in Note text.
(They cannot apply to {note} codes used in Sentence Templates.)
However, I agree the wording was somewhat clumsy, so I have rewritten it in the original posting.
Remember that there are more than just Narrative Reports and the [[ brackets ]] and Report Options also apply to ISR, Family Group Sheets, etc, where the meta-fields would not be duplicated in the Sentence. See the Show Fact Fields in Reports section.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5510
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Custom Fact Fields

Post by ColeValleyGirl »

tatewise wrote: 06 Jan 2023 14:24 Helen, I think you missed my overriding point that the Sort Dates article is not classified in the Facts Topic at all.
Fixed.
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Custom Fact Fields

Post by tatewise »

This article has been published in the KB as Entering Standard and Custom Fields for Facts.

The KB Narrative Report Fact Sentence Templates section Custom Fact Fields has been incorporated into this new article, so apart from the 1st sentence, should this now simply cross-refer to the new article?

If there are no significant comments over the next few days then this thread can be closed.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5510
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Custom Fact Fields

Post by ColeValleyGirl »

tatewise wrote: 10 Jan 2023 18:13 so apart from the 1st sentence, should this now simply cross-refer to the new article?
I think so...
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Custom Fact Fields

Post by tatewise »

Ok, I have updated that and submitted it for approval.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5510
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Custom Fact Fields

Post by ColeValleyGirl »

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

Re: Custom Fact Fields

Post by tatewise »

So can this be closed?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Post Reply