* Diagram icons using expressions

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
HilaryBroadbent
Gold
Posts: 21
Joined: 08 Mar 2005 23:26
Family Historian: V7

Diagram icons using expressions

Post by HilaryBroadbent » 02 Feb 2023 14:08

I have been using expressions to generate icons in diagrams and it has worked well.

Recently I used Ancestral Sources to enter information from a death certificate using the templated sources option, but the icon I use for a death certificate isn't showing.

Under diagram options on the boxes tab, the expression I have been using for a death certificate is -

=IsTrue(%INDI.DEAT.SOUR>_TYPE% = "Death Cert")

I have attached an image of what is showing on the Sources tab. Is this where the problem is?
Sources snip.JPG
Sources snip.JPG (21.8 KiB) Viewed 897 times

Hilary

avatar
Gowermick
Megastar
Posts: 1629
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Diagram icons using expressions

Post by Gowermick » 02 Feb 2023 14:40

Hilary,
It may be the cause, because Death Cert doesn’t match Death.
Try changing your query to look for Death, rather than Death Cert, that will match both Death and Death Cert.
I do this all the time looking for specific places, I simply enter enough characters to limit the search. i.e. if looking for cambridgeshire, I enter Cambridges with the s of shire, simply to eliminate a possible match with Cambridge that doesn’t have a final s
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

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

Re: Diagram icons using expressions

Post by tatewise » 02 Feb 2023 17:39

Mike is on the right track but you cannot use:
=IsTrue(%INDI.DEAT.SOUR>_TYPE% = "Death")
and expect it to match Death Cert as it will only match Death

You have a number of options.
  1. It seems your old Sources use the Generic Type Death Cert
    So one option is to change them all to Death using the plugin in Add Source Type to Source plugin (21492)
    Presumably, you won't be creating Sources with that Generic Type in future.
  2. The new templated Source uses the Generic Type Death
    I think that is set in AS and it should be possible to change it to Death Cert for the future
    Edit the one created today to change its Generic Type to Death Cert
  3. Leave all the Source Generic Type values as they are.
    Add an extra boxes condition =IsTrue(%INDI.DEAT.SOUR>_TYPE% = "Death")
    Alternatively, replace the current boxes condition with:
    =IsTrue( LeftText( %INDI.DEAT.SOUR>_TYPE%, 5 ) = "Death" )
    That will detect any Generic Type that starts with Death
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
LornaCraig
Megastar
Posts: 2989
Joined: 11 Jan 2005 17:36
Family Historian: V7
Location: Oxfordshire, UK

Re: Diagram icons using expressions

Post by LornaCraig » 02 Feb 2023 17:52

A fourth option is to use =ContainsText(%INDI.DEAT.SOUR>_TYPE%,"Death",STD)
Lorna

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

Re: Diagram icons using expressions

Post by tatewise » 02 Feb 2023 18:50

Lorna, that is not so reliable because it will match a Generic Type where death appears anywhere in any case not necessarily at the beginning and not necessarily a distinct word.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
HilaryBroadbent
Gold
Posts: 21
Joined: 08 Mar 2005 23:26
Family Historian: V7

Re: Diagram icons using expressions

Post by HilaryBroadbent » 02 Feb 2023 22:23

Many thanks for your suggestions.

I would like to keep the 'Death Cert' option as I only want the diagram icon to show where I have the death certificate, and not if the date of death has been derived from elsewhere - probate, MI etc.

I will probably go the route of editing the one already added and then see if I can alter the options in AS.

Thank you

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

Re: Diagram icons using expressions

Post by tatewise » 02 Feb 2023 22:30

That is a sensible way to go, but I doubt if a Probate citation would confuse things as its Generic Type wouldn't use Death...
Unless you know differently.

BTW: Always ensure any Death Cert citation is the 1st in the list against the Death Event otherwise the boxes expression will not detect it, i.e. It is looking at %INDI.DEAT.SOUR[1]>_TYPE%
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
HilaryBroadbent
Gold
Posts: 21
Joined: 08 Mar 2005 23:26
Family Historian: V7

Re: Diagram icons using expressions

Post by HilaryBroadbent » 03 Feb 2023 11:24

Just as an update -

Editing the existing source - I had to change the generic type on the All tab of the Source box.
On the main page where it has Type, I could add Death Cert but it didn't change on the Source Records page and didn't add the icon to the diagram.

I haven't found how to change AS easily, and I am not confident enough to mess with it.

As I'm not expecting to have many more death certificates to enter, I can live with this way of dealing with it.

Many thanks
Hilary

User avatar
NickWalker
Megastar
Posts: 2401
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Diagram icons using expressions

Post by NickWalker » 03 Feb 2023 11:55

HilaryBroadbent wrote:
03 Feb 2023 11:24
Just as an update -

Editing the existing source - I had to change the generic type on the All tab of the Source box.
On the main page where it has Type, I could add Death Cert but it didn't change on the Source Records page and didn't add the icon to the diagram.

I haven't found how to change AS easily, and I am not confident enough to mess with it.
In AS go to Tools->Options. Choose Death Settings from the section list at the top.
In the Source Type box change {SOURCETYPE} to Death Cert.

This will ensure that all death sources are given the type 'Death Cert' rather than 'Death'.

Best wishes

Nick
Nick Walker
Ancestral Sources Developer

https://fhug.org.uk/kb/kb-article/ancestral-sources/

avatar
HilaryBroadbent
Gold
Posts: 21
Joined: 08 Mar 2005 23:26
Family Historian: V7

Re: Diagram icons using expressions

Post by HilaryBroadbent » 03 Feb 2023 13:52

Many thanks Nick

Much appreciated

Post Reply