Page 1 of 1
Text Schemes Birth/Baptism Death/Burial
Posted: 26 Sep 2015 16:14
by davidf
I am once again trying to tweak my text schema. My attempts to search has not found an answer - please point me to a previous topic if necessary.
In my working diagram text scheme I like to show most of the detail so I want to show:
Birth
Baptism
Marriage
Death
Burial
Sometimes the Birth or Death dates are inferred from other information as "bef dd/mm/yyyy" or "aft dd/mm/yyyy" etc. based on a variety of evidence (spouse as widow in census, detail in wills etc.)
However where the sole inference for say the Birth arises from knowing the Baptism details, I don't want to show the birth details. Likewise for Death and Burial.
Where I know the birth as "bef dd/mm/yyyy" soley from Baptism records, I have set the source as "Baptism Record" (type = "Cross Reference"). Likewise for Death sourced as "Burial Record" (type = "Cross Reference").
So I would like to amend the existing Birth Text
from:
b. %INDI.BIRT.DATE:ABBREV3% in %INDI.BIRT.PLAC:TIDY%
to something like:
=Textif(INDI.BAPT[1].SOUR[1]>TITL="Baptism Record",b. %INDI.BIRT.DATE:ABBREV3% in %INDI.BIRT.PLAC:TIDY%,"")
So if the Birth is sourced to the Baptism Record the line does not show.
I am pretty certain (from previous troubles) that the error is in:
=Textif(INDI.BAPT[1].SOUR[1]>TITL="Baptism Record", ...
But can anyone be more specific?
Thanks
Re: Text Schemes Birth/Baptism Death/Burial
Posted: 27 Sep 2015 15:00
by tatewise
David, these Text Scheme conditional expressions need a great deal of care.
The way to approach them is to build them up bit by bit.
Let us examine the condition "if the Birth is sourced to the Baptism Record the line does not show":
INDI.BAPT[1].SOUR[1]>TITL="Baptism Record"
What you are testing is the Baptism Event INDI.BAPT that exhibits several mistakes:
1) The Baptism tag is BAPM not BAPT
2) It should test Birth tag BIRT anyway
3) The whole data reference must be enclosed in % chars
4) Index [1] are not necessary as they are the default
i.e.
%INDI.BIRT.SOUR>TITL% = "Baptism Record"
If you use the <<Insert button Data Reference Assistant it is more likely to be correct.
(There is a bug in FH V6 that omits the % when Insert button is used,
so copy & paste the correct Data Reference shown at the top instead.)
I presume you are using the same Cross Reference type of Source record, entitled Baptism Record, for all such cases.
The =TextIf( ) parameters must be reversed, because in yours, if the Source Title exists it displays text, otherwise nothing.
i.e.
=TextIf( %INDI.BIRT.SOUR>TITL% = "Baptism Record", , Text( ) )
The text to be displayed must use the Text( ) function to combine the component parts:
Text("b. " . %INDI.BIRT.DATE:ABBREV3% . " in " . %INDI.BIRT.PLAC:TIDY%)
But even this relies on both a DATE and PLAC existing, otherwise it might literally display:
b. in
So the refinement is:
Text("b. " . %INDI.BIRT.DATE:ABBREV3% . ExistsText(%INDI.BIRT.PLAC%," in ") . %INDI.BIRT.PLAC:TIDY%)
One final problem is what happens if there is no Birth Event at all, and for this the refinement is:
Text( ExistsText(%INDI.BIRT%,"b. ") . %INDI.BIRT.DATE:ABBREV3% . ExistsText(%INDI.BIRT.PLAC%," in ") . %INDI.BIRT.PLAC:TIDY%)
Thus the final expressions is:
=TextIf( %INDI.BIRT.SOUR>TITL% = "Baptism Record", , Text( ExistsText(%INDI.BIRT%,"b. ") . %INDI.BIRT.DATE:ABBREV3% . ExistsText(%INDI.BIRT.PLAC%," in ") . %INDI.BIRT.PLAC:TIDY%))
A variant would be to use same Source record for the Birth as for the Baptism so the =TextIf() condition becomes:
IsSameItem(%INDI.BIRT.SOUR>%,%INDI.BAPM.SOUR>%)
The equivalent expressions for Death and Burial are:
=TextIf( %INDI.DEAT.SOUR>TITL% = "Burial Record", , Text( ExistsText(%INDI.DEAT%,"d. ") . %INDI.DEAT.DATE:ABBREV3% . ExistsText(%INDI.DEAT.PLAC%," in ") . %INDI.DEAT.PLAC:TIDY%))
and
=TextIf( IsSameItem(%INDI.DEAT.SOUR>%,%INDI.BURI.SOUR>%), , Text( ExistsText(%INDI.DEAT%,"d. ") . %INDI.DEAT.DATE:ABBREV3% . ExistsText(%INDI.DEAT.PLAC%," in ") . %INDI.DEAT.PLAC:TIDY%))
Re: Text Schemes Birth/Baptism Death/Burial
Posted: 27 Sep 2015 19:48
by davidf
Thanks that looks as if it is going to do the trick!
1) In upgrading I had failed to notice the Insert % % bug (that has unlocked another issue I had - I was just "trusting the insert button" without getting what the % % did.)
2) I had foolishly assumed that event codes were the first 4 letters!
I think I will leave the SOUR[1] as I make my "most reliable source" the first one - and if it is a cross reference I want it to not show. If I then get independent evidence, I add a source and elevate it to the first source - and then the information shows.
David
Re: Text Schemes Birth/Baptism Death/Burial
Posted: 27 Sep 2015 20:26
by tatewise
1) The
% are necessary to differentiate Data Refs from plain text. See
FH V6 Diagram Broken Data Refs (12009) for related bugs.
2) Event tags are not necessarily even 4 chars. c.f. Christening =
CHR, Divorce =
DIV and Place records use
_PLAC
Your strategy of the 1st Source being the most reliable is mine too, and is perfectly consistent with the proposed expressions.
I think you misunderstand my point.
%INDI.BIRT.SOUR>% is identical to
%INDI.BIRT[1].SOUR[1]>%
and I think you will find that
FH typically removes those redundant
[1] anyway.
Re: Text Schemes Birth/Baptism Death/Burial
Posted: 27 Sep 2015 22:02
by davidf
Thanks
Re: Text Schemes Birth/Baptism Death/Burial
Posted: 27 Sep 2015 22:54
by AdrianBruce
Just as a matter of interest - how would you handle the case where the baptism record has an explicit record of the date of birth? Because presumably you wouldn't want to suppress that one?
Re: Text Schemes Birth/Baptism Death/Burial
Posted: 28 Sep 2015 10:00
by tatewise
My answer is twofold.
If the condition %INDI.BIRT.SOUR>TITL% = "Baptism Record" is used, then it automatically handles that case, assuming David uses the actual Baptism Source for the Birth Event instead of the dummy Baptism Record Cross Reference Source when the Birth Date is known.
If the condition IsSameItem(%INDI.BIRT.SOUR>%,%INDI.BAPM.SOUR>%) is used, and the same Baptism Source is always used for both events, then the condition needs refining to:
IsSameItem(%INDI.BIRT.SOUR>%,%INDI.BAPM.SOUR>%) and (DayNumber(%INDI.BIRT.DATE%) = DayNumber(%INDI.BAPM.DATE%))
This assumes that when Birth Date is NOT known it uses Bef <Baptism Date> i.e. Day Number for Birth equals Day Number for Baptism. Otherwise, where the Birth Date is known, and therefore different from the Baptism Date, the Day Numbers will be different, and thus the Birth details will be shown.