* Expressions in a Diagram

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile
Post Reply
avatar
gsward
Diamond
Posts: 76
Joined: 11 Mar 2011 14:47
Family Historian: V6

Expressions in a Diagram

Post by gsward » 20 Mar 2019 21:20

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

User avatar
tatewise
Megastar
Posts: 18654
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Expressions in a Diagram

Post by tatewise » 21 Mar 2019 11:39

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 Knowledge Base > 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

avatar
gsward
Diamond
Posts: 76
Joined: 11 Mar 2011 14:47
Family Historian: V6

Re: Expressions in a Diagram

Post by gsward » 21 Mar 2019 14:58

Thank you, Mike (again). I realised this would be useful in "seeing" where people were in their census family groups.

Graham

Post Reply