I would like to be able to colour code the boxes in a descendant diagram when a particular place occurs in a specific census year.
%INDI.CENS[year=1841]% identifies the year.
The place element is in the second part of the place, but I cannot work out how to search for it and combine with the expression above.
Thanks,
Graham
* Expressions in a Diagram
- tatewise
- Megastar
- Posts: 27087
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Expressions in a Diagram
You need to use the =TextPart(...) function.
e.g.
=TextPart( %INDI.CENS[year=1841].PLAC%, 2 ) to extract 2nd part of Census Place field.
That must be tested against the place name within the =IsTrue(...) function.
e.g.
=IsTrue( TextPart( %INDI.CENS[year=1841].PLAC%, 2 ) = "London" )
There are examples of similar expressions in how_to:understanding_expressions|> Understanding Expressions under Fact & Name Fields.
I assume you know that expressions applies to the Diagram > Options > Boxes > << Add Condition > Expression feature.
e.g.
=TextPart( %INDI.CENS[year=1841].PLAC%, 2 ) to extract 2nd part of Census Place field.
That must be tested against the place name within the =IsTrue(...) function.
e.g.
=IsTrue( TextPart( %INDI.CENS[year=1841].PLAC%, 2 ) = "London" )
There are examples of similar expressions in how_to:understanding_expressions|> Understanding Expressions under Fact & Name Fields.
I assume you know that expressions applies to the Diagram > Options > Boxes > << Add Condition > Expression feature.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Expressions in a Diagram
Thank you, Mike (again). I realised this would be useful in "seeing" where people were in their census family groups.
Graham
Graham