Page 1 of 1
Combining PLACE and ADDRESS fields on Diagrams
Posted: 14 Feb 2019 13:03
by Bundle
I am in the middle of trying to clean up my messy data, aso that it is consistent. At the moment my places are a mix: some have Place and Address fields entered separately, some have all address info mixed into the Place field. I'm having a good read of previous posts on this before making up my mind to separate or combine all within the place field.
One question: How would I combine Place and Address fields on Diagrams, so that a burial reads something like:
Buried: 15 May 1678 in St Mary's Church, Winchester, Hampshire ?
Nickie
Re: Combining PLACE and ADDRESS fields on Diagrams
Posted: 14 Feb 2019 13:41
by Jane
Try
Code: Select all
=ExistsText(%INDI.BURI[1+]%,"Buried:") %INDI.BURI[1+].DATE:COMPACT% in %INDI.BURI[1+].ADDR%, %INDI.BURI[1+].PLAC:TIDY%
Re: Combining PLACE and ADDRESS fields on Diagrams
Posted: 14 Feb 2019 14:13
by tatewise
Essentially, it is just a matter of editing the Diagram Text Scheme for each fact to include the ADDR field between
the DATE field and the PLAC field, similar to Jane's suggestion, but that does not cater for any of the points below.
There are several details to consider...
The PLAC field supports the :TIDY qualifier to remove adjacent empty comma separated columns.
The ADDR field does not, so you would need to involve the =TextPart( ... , TIDY ) function.
Although the prefix in works well for your example, most addresses need the prefix at instead.
e.g. Born: 15 May 1678 at 25, Park Road, Winchester, Hampshire
In virtually all cases the prefix at will be satisfactory.
e.g. Buried: 15 May 1678 at St Mary's Church, Winchester, Hampshire
Also the possibilities of either or both of ADDR and PLAC being missing must be considered.
So usually the best way is to put the prefix at before ADDR and the prefix in before PLAC.
Both prefixes would be conditional on the associated field existing.
e.g. Buried: 15 May 1678 at St Mary's Church in Winchester, Hampshire
(BTW: A similar problem exists if you just concatenate ADDR and PLAC as the comma between is conditional.)
So you could use the =CombineText(...) function.
e.g.
%INDI.BIRT.DATE:COMPACT%=CombineText(" at ",TextPart(%INDI.BIRT.ADDR%,1,0,TIDY),,)=CombineText(" in ",%INDI.BIRT.PLAC:TIDY%,,)
Re: Combining PLACE and ADDRESS fields on Diagrams
Posted: 14 Feb 2019 15:04
by Bundle
Many thanks Jane and Mike; that will be my homework!
Nickie