I work with diagrams a lot but instead of using icons to indicate censuses I include census details in the text scheme, to show at a glance where someone was at 10 year intervals. I use a census event for the UK 1939 Register.
My template for the census in the diagram text scheme is:
=ExistsText(%INDI.CENS[1+]%,"Census") %INDI.CENS[1+].DATE:YEAR%: %INDI.CENS[1+].ADDR%=ExistsText(%INDI.CENS[1+].ADDR%,", ")%INDI.CENS[1+].PLAC:MEDIUM%
which produces, for example:
Census 1911: 3 Tucker Street, Wells, Somerset
My template for the census sentence in the Property box is:
{individual} was recorded in the {=TextIf(GetDisplayText(%FACT.DATE%,min) = "29 September 1939","National Register","census")} {date} {place}<, at {address}>
which produces:
He was recorded in the census on 2 April 1911 in .....
or
He was recorded in the National Register on 29 September 1939 in......
substituting National Register for Census as appropriate.
I have been trying, and failing, to change the diagram text scheme line to make the same substitution in the case of the National Register. Can anyone come to my aid?
It’s a trivial point but it bugs me that I can’t work it out!
* Diagram text scheme template
- LornaCraig
- Megastar
- Posts: 2996
- Joined: 11 Jan 2005 17:36
- Family Historian: V7
- Location: Oxfordshire, UK
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Diagram text scheme template
The first function needs adapting along the same lines as the Sentence Template:
=ExistsText(%INDI.CENS[1+]%,TextIf(GetDisplayText(%INDI.CENS[1+].DATE%,min) = "29 September 1939","National Register","Census"))
Also =CombineText( ,%INDI.CENS[1+].ADDR%, ", ", ) is a bit more compact and efficient
than %INDI.CENS[1+].ADDR%=ExistsText(%INDI.CENS[1+].ADDR%,", ")
=ExistsText(%INDI.CENS[1+]%,TextIf(GetDisplayText(%INDI.CENS[1+].DATE%,min) = "29 September 1939","National Register","Census"))
Also =CombineText( ,%INDI.CENS[1+].ADDR%, ", ", ) is a bit more compact and efficient
than %INDI.CENS[1+].ADDR%=ExistsText(%INDI.CENS[1+].ADDR%,", ")
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- LornaCraig
- Megastar
- Posts: 2996
- Joined: 11 Jan 2005 17:36
- Family Historian: V7
- Location: Oxfordshire, UK
Re: Diagram text scheme template
Thanks. I had it almost right but must have omitted a comma. It was too late last night when I was looking at it!
I'll use the more compact =CombineText option too.
I'll use the more compact =CombineText option too.
Lorna
Re: Diagram text scheme template
Is there somewhere to learn the basics of how to write this code please.
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Diagram text scheme template
Yes, start with how_to:understanding_expressions|> Understanding Expressions.
That cross-refers to Data References and Functions that are the key components and to FH Help pages.
If you have any particular Expression in mind then we could use it as a tutorial here.
That cross-refers to Data References and Functions that are the key components and to FH Help pages.
If you have any particular Expression in mind then we could use it as a tutorial here.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry