* Colour Coding Infant Deaths

Questions about creating, customising and using diagrams and charts
Post Reply
avatar
rfj1001
Superstar
Posts: 291
Joined: 14 Dec 2003 18:11
Family Historian: V7
Location: Dorset, England
Contact:

Colour Coding Infant Deaths

Post by rfj1001 »

I'd like to colour code the box fill colour of infant deaths (eg age <1 at death) by setting up a condition in Diagram Options.

I'm working on the assumption that %INDI.DEAT.AGE% is the data reference I need. But I can't seem to find any help online on creating the full expression from there and my best guesses haven't worked.

Could someone help on the specific and, more generally, I've drawn a blank in the KB (and the book) on more general help on how to create expressions. Have I missed something?

Many thanks
User avatar
Jane
Site Admin
Posts: 8518
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Colour Coding Infant Deaths

Post by Jane »

The best place to look for help on Functions in the Family Historian Help in the Advanced section.

Code: Select all

=IsTrue(Exists(%INDI.DEAT.DATE%) and (Number(%INDI.DEAT.DATE:AGE_AT%) < 1))
The above code will colour the box if there is a death date and the computed age at death was less than one.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Colour Coding Infant Deaths

Post by tatewise »

To explain why that is necessary, the data ref %INDI.DEAT.AGE% refers to the Age box in the Death event.
Often that is not filled in, so the AGE_AT Death must be computed from the Birth Date.
However, I can find no documentation for the AGE_AT qualifier to determine what happens if no Birth Date exists.
There is the =AgeAt(...) function which performs a similar calculation but also does not say what happens with no Birth Date.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
rfj1001
Superstar
Posts: 291
Joined: 14 Dec 2003 18:11
Family Historian: V7
Location: Dorset, England
Contact:

Re: Colour Coding Infant Deaths

Post by rfj1001 »

Many thanks Jane - worked a treat :)

I also had a look at the advanced help file as you suggested. As the name suggests it is advanced so will not be an easy start up the learning curve. But I'll have a go using it next time
Post Reply