* Expression for Inclusion in 1939 Census Help please

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
StevieSteve
Platinum
Posts: 46
Joined: 06 Jan 2014 18:04
Family Historian: V5

Expression for Inclusion in 1939 Census Help please

Post by StevieSteve » 14 Nov 2015 11:35

I show icons where I haven't found entries for an individual in a census.

They're already pretty longwinded but the one for 1939 is failing, I think because where an estimated death date is in the future, it gives a null return

I have so many IsTrues (are they all needed??) and brackets, I'm just getting lost.

The expression I have is

=IsTrue(IsTrue(IsTrue(%INDI.BIRT.DATE% < DateAt(1939,9,28)) and Not(Exists(%INDI.CENS[year=1939]%)) and IsTrue(IsTrue(%INDI.DEAT.DATE% > DateAt(1939,9,28)) or IsTrue(IsTrue(EstimatedDeathDate(%INDI%,LATEST,2) > DateAt(1939,9,28)) and Not(Exists(%INDI.DEAT%))))) and Not(HasFlag(%INDI%,"Foreign")))

and it's supposed to represent

doesn't have custom flag "Foreign", born before 1939 without a 1939 census entry

where
death is after 1939
or
death date not known and estimated death date is after 1939



Can anyone simplify matters for me, please

Thanks!

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

Re: Expression for Inclusion in 1939 Census Help please

Post by tatewise » 14 Nov 2015 14:13

Just use the EstimatedDeathDate(...LATEST...) function regardless of whether a Death Date exists or not, because if a Death Date exists then that function will supply that exact Date, or round up to end of Month or Year. Only if no Death Date exists will that function refer to Burial/Cremation Dates or relation Event Dates, etc.

I think then you can get down to one IsTrue() to test Birth < 1939 and Death > 1939 and Not( CENS[year=1939] ) and Not(HasFlag()). The only other possibility is that the Birth and Death tests may need enclosing in IsTrue().

I also suggest you use EstimatedBirthDate(...EARLIEST...) instead of BIRT.DATE.

BTW: Why is the 1939 expression any different from other Census years?

FYI: Soon I will update the Lookup Missing Census Facts Plugin to include the 1939 Register.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
StevieSteve
Platinum
Posts: 46
Joined: 06 Jan 2014 18:04
Family Historian: V5

Re: Expression for Inclusion in 1939 Census Help please

Post by StevieSteve » 14 Nov 2015 15:58

Thanks Mike

To answer

Why is the 1939 expression any different from other Census years?

I'm guessing that the Estimated Death function of anyone in the 1911 Census is before today's date so there is never a null value produced

avatar
StevieSteve
Platinum
Posts: 46
Joined: 06 Jan 2014 18:04
Family Historian: V5

Re: Expression for Inclusion in 1939 Census Help please

Post by StevieSteve » 15 Nov 2015 13:18

After fruitless attempts with IsEmpty, Not(Exists) and > Today(), found NullDate which seems to have done the trick

=IsTrue(Not(Exists(%INDI.CENS[year=1939]%)) and Not(HasFlag(%INDI%,"Foreign")) and (EstimatedBirthDate(%INDI%,EARLIEST,2) < DateAt(1939,9,28)) and IsTrue((EstimatedDeathDate(%INDI%,LATEST,2) > DateAt(1939,9,28)) or NullDate(EstimatedDeathDate(%INDI%,LATEST,2))))


Cheers

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

Re: Expression for Inclusion in 1939 Census Help please

Post by tatewise » 15 Nov 2015 15:24

That looks good but I think you may not need to test for a NullDate.
When either the Birth or Death Date is Null then the comparison with DateAt is always true, as if they were Born eons ago or Died eons in future.
But I am happy to be proved wrong.

It works that way when using the date:Compare(date) function in Plugins, but date < date and date > date in Exprerssions may be different.

If so, then you should use or NullDate(EstimatedBirthDate(%INDI%,EARLIEST,2)) too!
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
StevieSteve
Platinum
Posts: 46
Joined: 06 Jan 2014 18:04
Family Historian: V5

Re: Expression for Inclusion in 1939 Census Help please

Post by StevieSteve » 16 Nov 2015 08:09

Not proving you wrong, but I couldn't get it to work without the NullDate test

Adding the test to the birth added entries from wills and Marriage witnesses where I only have a name. Not a worry for the diagrams, but useful to add as the bottom row of a query (which I had previously restricted to Relations)

Thanks again

Post Reply