* Place & Address and formatting codes in sentences

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile
Post Reply
avatar
evinther
Platinum
Posts: 36
Joined: 15 Feb 2009 09:43
Family Historian: V7
Location: Denmark
Contact:

Place & Address and formatting codes in sentences

Post by evinther » 12 Oct 2021 14:08

Hi,

I'm struggeling a bit with application of Place and Address. I'm not sure what the case is for UK, but In DK many records were previously organised occording to church paris, shire and county (not just church records, but also cencuses, land records etc). So my current use of Place is: town - parish - shire - county, and Address i use for todays postal address, if identifiable, or a name of a house or farm.

Any views on this?

By using "<>" aound a property name and some additional text, it is only shown if the property has a value., e.g. "{individual} lived <at {address}> <in {_place}>". This basically works fine, but if both have a value, the sentence can become very long, and hard to see in it's full extent, in verious FH dialogs and lists (lack of screen etate).

So my question is, if both have a value, can I make only a prefered property be shown, e.g. Address?

Regards
Erik

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

Re: Place & Address and formatting codes in sentences

Post by tatewise » 12 Oct 2021 14:45

I think you are asking for the Place to be excluded if there is an Address.

If so, then replace < at {address}>< in {place}> with
< at {address}>{=TextIf( Exists(%FACT.ADDR%), "", CombineText( " in ", %FACT.PLAC% ) )}

That is using the =TextIf( ) function to check if the Fact Address exists.
If it does then display nothing ""
If it doesn't then display the CombinedText " in " and the Fact Place but only if the Fact Place exists.

This is an advanced use of several functions and data references.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
evinther
Platinum
Posts: 36
Joined: 15 Feb 2009 09:43
Family Historian: V7
Location: Denmark
Contact:

Re: Place & Address and formatting codes in sentences

Post by evinther » 12 Oct 2021 15:23

You are truly awesome Mike!

At first it worked as expected, but if an Address had first been entered, and the deleted, the Place did not reappear. I expect that an Address entity is created when a text is entered, and when deleted still exists, but with an empty value. So I replaced the Exists function call with IsEmpty, and switched the order of the parameters, and then is works as expected:

< at {address}>{=TextIf(IsEmpty(%FACT.ADDR%),CombineText( " in ", %FACT.PLAC% ), "")}

Thanks
Erik

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

Re: Place & Address and formatting codes in sentences

Post by tatewise » 12 Oct 2021 16:02

You are correct that when the Address box is cleared the Address field still exists, but is automatically deleted when FH is next opened, so then my expression would work, but IsEmpty() copes with both cases.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply