Page 1 of 1

Use of {place_2} in Facts other than Emigration and Immigration

Posted: 13 Sep 2018 12:35
by D-W
As I understand it the use of the code {place_2} is restricted to the facts Emigration and Immigration. Also, there is no {address_2} which would be useful.
Most of my and my wife’s ancestors moved around within this country and usually I can determine where they were on a certain date and where they were on a later date – frequently years apart. Thus, I would like to create a custom family fact which generated the text:
“Between X and Y Jack and Gill Smith moved from A to B. Bill Smith also moved with them”. If the codes {place_2} and {address_2} were available the code for a family move would look like:
{date} {%CUR_PRIN.FAMS[1]>HUSB[1]>NAME[1]:GIVEN%} and {%CUR_PRIN2.FAMS[1]>WIFE[1]>NAME[1]:GIVEN%} {%CUR_PRIN.FAMS[1]>HUSB[1]>NAME[1]:SURNAME%} moved from {address}, {_place} to {address_2}, {_place_2}.< {other=resident} also moved with them.> {note}
I have two questions:
1 Is there any way of using {place_2} in a custom fact?
2 Is there any possibility of making {address_2} available? (This is possibly an addition to the Wish List.)

Re: Use of {place_2} in Facts other than Emigration and Immigration

Posted: 13 Sep 2018 12:47
by Jane
It's not possible to do that in the way you would like, but what you could do is to use the GetLabelledText and a private note and then extract the second place and address from the note on a standard custom event.

If you do a search for GetLablledText there are lots of example of use so basically you would add a Note template like
[[
place_2: My New Village
address_2: My New House
]]
This is the rest of my note about the move.

Code: Select all

{date} {%CUR_PRIN.FAMS[1]>HUSB[1]>NAME[1]:GIVEN%} and {%CUR_PRIN2.FAMS[1]>WIFE[1]>NAME[1]:GIVEN%} {%CUR_PRIN.FAMS[1]>HUSB[1]>NAME[1]:SURNAME%} moved from {address}, {_place} to {=GetLabelledText(%FACT.NOTE2%,"address_2"}, {=GetLabelledText(%FACT.NOTE2%,"place_2"}.< {other=resident} also moved with them.> {note}

Re: Use of {place_2} in Facts other than Emigration and Immigration

Posted: 13 Sep 2018 13:02
by tatewise
For further details and examples see the how_to:narrative_report_fact_sentence_templates|> Narrative Report Fact Sentence Templates and particularly under the Custom Fact Fields section.

BTW:
You may need some < chevron > brackets in the Sentence Template to cater for the possibilities of missing Address or Place data, to avoid redundant commas or spaces.

FYI:
{place_2} and {_place_2} refer to a special FH custom _PLAC tag that is only supported in Emigration & Immigration events.
It is NOT a standard GEDCOM tag, so will not migrate to any other product, and is best avoided. It is a legacy feature.
See glossary:gedcom_extension_list|> GEDCOM Extension List.
It is unlikely that {address_2} and associated custom _ADDR tag would ever get implemented, as it would cause much the same issues as _PLAC tag.

Re: Use of {place_2} in Facts other than Emigration and Immigration

Posted: 15 Sep 2018 10:02
by D-W
Hi Jane and Tatewise
Many thank for your help. I had not appreciated that {place_2} was not a standard GEDCOM tag and therefore the addition of {address_2} was extremely unlikely.
I will certainly try what you suggested – it will be a leaning experience as I have never used Custom Fact Fields.
In the meantime I have been using the following custom fact as a workaround:
{%CUR_PRIN.FAMS[1]>HUSB[1]>NAME[1]:GIVEN%} and {%CUR_PRIN2.FAMS[1]>WIFE[1]>NAME[1]:GIVEN%} {%CUR_PRIN.FAMS[1]>HUSB[1]>NAME[1]:SURNAME%} moved from XXXXXX to {address}, {_place} {date}< {their ages}>.< {other=resident} also moved with them.> {note}
When I use this fact I edit the Sentence field in the Facts tab to replace the XXXXXX with the place the family moved from. Perhaps it’s a bit clumsy but it does give me what I want in Narrative Reports
I also use an Override Template for Facts tab listing of
Moved to {address} {_place}
Once again many thanks for your help – I certainly appreciate the versatility of Family Historian which both of you have helped me understand.

Re: Use of {place_2} in Facts other than Emigration and Immigration

Posted: 15 Sep 2018 10:23
by tatewise
If you replaced your Custom Event Fact with a similar Custom Attribute Fact it has an additional field that appears immediately after its name in the Facts tab, and in the Sentence Template has the code {value}.
(Similar to Occupation and Education standard Attribute facts.)

So in your Sentence Template expression you can replace XXXXXX with {value} and that will automate what you now perform manually, as long as you enter the From Place/Address in the Attribute Fact value.

This is the only significant difference between an Event and an Attribute, with the benefit of having that one extra standard GEDCOM value field.

Re: Use of {place_2} in Facts other than Emigration and Immigration

Posted: 15 Sep 2018 23:28
by D-W
Many thanks. That sound like a good idea.