Where I have a death certificate/registration for an individual I create a source whose short title takes the form "D. Cert., [SURNAME], [given names] [year]". I should note at this point the name used in the title is the name recorded on the death certificate, so it may not match the birth name of the individual.
I am using the expression =ContainsText(%INDI.DEAT.SOUR>ABBR%,"D. Reg.",STD) to display an icon on charts against individuals who have a date of death that cites such a source. That enables me to see at a glance where in a tree I have already found a death registration and where I still need to look.
Generally it works well enough, but I am getting some false positives. There are a few individuals for whom I do not yet have an actual date of death, but I have a "before date" derived from their spouse's death certificate (i.e. the spouse is described on their death certificate as "the widow of X", so I know the individual was dead before their spouse's date of death and record it accordingly). Consequently, a death fact is created for the individual that records a "before" date and cites their spouse's death certificate. This wrongly triggers the display of the icon on the chart.
I don't want to not record the before date for the individual's death. Is there a way to tweak the expression, so that it is not wrongly triggered in the scenario I just described? I guess it would I either need somehow to exclude date ranges containing "before", or else check if the short title of the source being cited matches that particular individual's name (but that might be complicated, see first paragraph). Either way, I don't know how to achieve what I need.
Can anyone give me any pointers?
* Expression help please
-
Peter Collier
- Famous
- Posts: 191
- Joined: 04 Nov 2015 17:32
- Family Historian: V7
- Location: Worcestershire, UK
Expression help please
Peter Collier
Collier, Savory, Buckerfield, Edmonds, Low, Dungey, Lester, Chambers, Walshe, Moylan, Bradley, Connors, Udale, Wilson, Benfield, Downey
Collier, Savory, Buckerfield, Edmonds, Low, Dungey, Lester, Chambers, Walshe, Moylan, Bradley, Connors, Udale, Wilson, Benfield, Downey
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Expression help please
Peter, there is nothing in your description that explains how you are testing for "individuals who have a date of death".
Your expression is only testing for a Death event whose 1st Source Citation has a Short Title containing "D. Reg."
Presumably, you are assuming that if there is a suitable Source Citation then there must be a Death Date.
That is why you get the Icon in the case of the widow scenario.
So you need to extend the expression to involve %INDI.DEAT.DATE%
See the FH Help page for General Topics > Date Formats
At the bottom, it explains about the XDATETYPE qualifier.
In your example %INDI.DEAT.DATE:XDATETYPE% = "Before" for a before date.
An alternative is %INDI.DEAT.DATE:XDATETYPE% = "Date" for a simple explicit date.
So a complete expression might be:
=IsTrue( %INDI.DEAT.DATE:XDATETYPE% = "Date" and ContainsText(%INDI.DEAT.SOUR>ABBR%,"D. Reg.",STD) )
Your expression is only testing for a Death event whose 1st Source Citation has a Short Title containing "D. Reg."
Presumably, you are assuming that if there is a suitable Source Citation then there must be a Death Date.
That is why you get the Icon in the case of the widow scenario.
So you need to extend the expression to involve %INDI.DEAT.DATE%
See the FH Help page for General Topics > Date Formats
At the bottom, it explains about the XDATETYPE qualifier.
In your example %INDI.DEAT.DATE:XDATETYPE% = "Before" for a before date.
An alternative is %INDI.DEAT.DATE:XDATETYPE% = "Date" for a simple explicit date.
So a complete expression might be:
=IsTrue( %INDI.DEAT.DATE:XDATETYPE% = "Date" and ContainsText(%INDI.DEAT.SOUR>ABBR%,"D. Reg.",STD) )
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
Peter Collier
- Famous
- Posts: 191
- Joined: 04 Nov 2015 17:32
- Family Historian: V7
- Location: Worcestershire, UK
Re: Expression help please
Yes, your presumption is correct. I only ever enter a date of death (and thus create a death fact) if I have a supporting source, so I essentially took a shortcut by only checking the short title of the cited source.
Admittedly, that's short and dirty, but it was the best I could achieve with my currently limited knowledge of expressions and it works 95% of the time. It does however lead to the problem with false positives in the specific circumstances I outlined.
Thanks for the suggested improved expression with the qualifier for explicit dates. I shall give that a go and see how it works.
Admittedly, that's short and dirty, but it was the best I could achieve with my currently limited knowledge of expressions and it works 95% of the time. It does however lead to the problem with false positives in the specific circumstances I outlined.
Thanks for the suggested improved expression with the qualifier for explicit dates. I shall give that a go and see how it works.
Peter Collier
Collier, Savory, Buckerfield, Edmonds, Low, Dungey, Lester, Chambers, Walshe, Moylan, Bradley, Connors, Udale, Wilson, Benfield, Downey
Collier, Savory, Buckerfield, Edmonds, Low, Dungey, Lester, Chambers, Walshe, Moylan, Bradley, Connors, Udale, Wilson, Benfield, Downey