* Change from Flags to Expressions for Diagram Icons

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
User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Change from Flags to Expressions for Diagram Icons

Post by rodit »

I have been following the discussion Enhancement or have I missed something? (13286) (and earlier ones) re. Flags v. Expressions, and realise that Expressions are the way to go.
Presently I use Flags as follows:
Birth, Marriage and Death BUT only if I have the certificate (paper or digital) i.e. a GRO record alone does not get a flag
Baptism and Burial BUT only if I have a digital copy of the relevant register
All Censuses (now including the 1939 Register)

I have arranged these flags so that they appear, more or less, in chronological order under the Box they refer to. (Marriages are occasionally a bit out). There can be up to 10 or 11 as a maximum. See my Attachment

I have tentatively started playing around with Expressions but have these questions:
1 Do I need a separate one for each Census?
2 How would I handle my BMD and Bap/Bur records within my 'system'?
3 How are they arranged chronologically?
And
4 Assuming that it is possible to cover everything, how do I remove replaced Flags from some thousands of individuals?

I hope that this makes sense, and your comments would be appreciated.

Regards

Roger
Attachments
Flag Example.JPG
Flag Example.JPG (43.15 KiB) Viewed 13266 times
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Change from Flags to Expressions for Diagram Icons

Post by tatewise »

I have split this off and moved it to FH General Usage Forum, where more appropriate.

See how_to:using_flags_and_icons_and_expressions|> Using Flags and Icons and Expressions and how_to:understanding_expressions|> Understanding Expressions.

1 Yes, separate Expression for each Census using the [year=1234] index.
2 BMD & Bap/Bur Expressions use BIRT, MARR, DEAT, BAPM, BURI tags instead of CENS.
3 I presume the order of the Box Conditions sets the order.
4 See how_to:using_flags_and_icons_and_expressions|> Using Flags and Icons and Expressions under Using Flags to delete them.

For the Expressions to detect that the relevant Source exists you need a consistent naming convention. Either a Source Type to differentiate between Census Record, Birth Certificate, Death Certificate, GRO Index, Parish Register, etc, or a Source Title that includes those names. The most relevant Source Citation must be first for each Fact.

Note that the Expressions for MARR are a little different because they are FAMily facts.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
davidm_uk
Megastar
Posts: 740
Joined: 20 Mar 2004 12:33
Family Historian: V7
Location: St Albans, Hertfordshire, UK

Re: Change from Flags to Expressions for Diagram Icons

Post by davidm_uk »

Here's the set of expressions I currently use if it's any help:

=ContainsText(%INDI.BIRT.SOUR>TITL%,"Birth Certificate",STD)
=ContainsText(%INDI.BIRT.SOUR>TITL%,"Birth Index",STD)
=ContainsText(%INDI.CHR.SOUR>TITL%,"Christening",STD)
=ContainsText(%INDI.CHR.SOUR>TITL%,"Baptism",STD)
=ContainsText(%CUR~FAMS>MARR.SOUR>TITL%,"Marriage Certificate",STD)
=ContainsText(%CUR~FAMS>MARR.SOUR>TITL%,"Marriage Index",STD)
=ContainsText(%INDI.DEAT.SOUR>TITL%,"Death Certificate",STD)
=ContainsText(%INDI.DEAT.SOUR>TITL%,"Death Index",STD)
=ContainsText(%INDI.BURI.SOUR>TITL%,"Burial",STD)
%INDI.CENS[year=1831]%
%INDI.CENS[year=1841]%
%INDI.CENS[year=1851]%
%INDI.CENS[year=1861]%
%INDI.CENS[year=1871]%
%INDI.CENS[year=1881]%
%INDI.CENS[year=1891]%
%INDI.CENS[year=1901]%
%INDI.CENS[year=1911]%
=ContainsText(%INDI.RESI.SOUR>TITL%,"Electoral Roll",STD)

The order of these determines the sequence (left to right) in which the icons appear in the diagram. All my sources have a consistent title scheme which contain the "words above". I just have one for Electoral Roll entries, although there are multiple residence facts with different dates and places, I decided that it would be too cluttered to have one for every year entry, or even a range of dates.

I still have a few flags which generate icons on diagrams, for example New Data, To Validate, Twins, Contact.
David Miller - researching Miller, Hare, Walker, Bright (mostly Herts, Beds, Dorset and London)
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Change from Flags to Expressions for Diagram Icons

Post by tatewise »

Thanks David that is very helpful and comprehensive.

To test Source Type instead of Source Title use this style of Expression:

=IsTrue(%INDI.BIRT.SOUR>_TYPE% = "Birth Certificate")

=IsTrue(%INDI.CENS[year=1831].SOUR>_TYPE% = "Census")

One thing to be aware of with =ContainsText(...) is that the text words are case-insensitive, do not have to match whole words, and can occur in any order. So for example "Scrolls are electorally correct." contains text "Electoral Roll".
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Re: Change from Flags to Expressions for Diagram Icons

Post by rodit »

Thanks, Gents

I will take all on board.
At present I only record in Notes of GRO B, GRO M, GRO D or AS inputs whether or not I have the relevant certificate. Looks as if I will have to create new Sources for those events which I have a Certificate for.

(I still keep the GRO details even after using AS)

Thanks again

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

Re: Change from Flags to Expressions for Diagram Icons

Post by tatewise »

Which Notes?
The local fact Note below the fact (Birth, Census, Death, etc) in the Facts tab?

In which case you could use something like:
=ContainsText(%INDI.BIRT.NOTE2%,"GRO B",STD)
But unfortunately the B will match any upper or lower case letter b anywhere in the Note.

But I am a bit confused. If you are using AS, aren't you creating Source Citations for each Certificate, etc?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Re: Change from Flags to Expressions for Diagram Icons

Post by rodit »

I use the Note area at the bottom of the Source panel, as well as the Note area at the bottom of the relevant AS screen.
I am creating citations with AS, but some of these come from Online Parish Records in addition to Certificates.

I will play around with yours and David's suggestions (in a Copy!), and see how I go.
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Change from Flags to Expressions for Diagram Icons

Post by tatewise »

I am still a bit confused.
If you use AS to add all your CENS, BIRT, BAPM, MARR, DEAT, BURI events then they will all have a Source Citation and each Source record will have a Source Type of Census, Birth, Baptism, Marriage, Death, Burial respectively (assuming you have used the default AS Tools > Options settings).

It does not matter whether they are GRO Certificates or Parish Records, those Source Types will apply.

Presumably, if you only have a GRO Index then either there is no Source Citation at all, or the Source Type is different from those above, say Index, and not Birth, Marriage, or Death.

If all the above assumptions are correct, then the Notes you have are immaterial, and you only need to test the Source Type.

The tests need to be carried out on a copy of a Diagram Type not a copy of your Project.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Re: Change from Flags to Expressions for Diagram Icons

Post by rodit »

The Source Type does not tell me that I used a certificate or parish register for the data entered into AS.

I have now got Expressions in play, basically using David's suggestions.

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

Re: Change from Flags to Expressions for Diagram Icons

Post by tatewise »

Just as a matter of interest what does the Source Type tell you?

Because that is the whole point of Source Type, to tell you what type of Source Citation you have, and allow you to test what records you have.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Re: Change from Flags to Expressions for Diagram Icons

Post by rodit »

I'd missed this. Source Type is Birth

Roger
User avatar
davidm_uk
Megastar
Posts: 740
Joined: 20 Mar 2004 12:33
Family Historian: V7
Location: St Albans, Hertfordshire, UK

Re: Change from Flags to Expressions for Diagram Icons

Post by davidm_uk »

But that of course doesn't distinguish between Birth Certificate and Birth Index. I try to obtain birth (and M and D) certificates for all ancestors, but just settle for birth index copies for more distant rellies unless I need details from a certificate to help try and find the ancestor.

No reason why you shouldn't create Source Types for Birth Certificate and Birth Index of course, similarly for M and D, and any other source types, eg Probate, and even Other as a catch all (not that I'd use that with an icon).

I can't remember what AS does with source type, maybe it only has limited ones for the sources that it handles.
David Miller - researching Miller, Hare, Walker, Bright (mostly Herts, Beds, Dorset and London)
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Change from Flags to Expressions for Diagram Icons

Post by tatewise »

Roger, as long as Source Type = Birth means you have a Birth Certificate then your Expression can test for that.

What Source Type do you use for a Birth Index?

I suspect the Source Type = Baptism means you have a Parish Register Baptism entry, and so on for all the other Source Types, providing you don't use the same Source Types for GRO BMD Index entries .
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Re: Change from Flags to Expressions for Diagram Icons

Post by rodit »

David
Exactly - AS uses Birth Type (plus the rest), and does not know where the information has come from. I don't know if this can be changed.

Mike
I use AS to enter all events (B,M,D,Bap,Bur,Cen), which then creates a Source with the relevant Type
at the start of the name.
However, I may not necessarily have a copy or image of the relevant Certificate, or Parish Doc but would have the relevant Information from Online Parish Records.
It is only if I have a physical certificate, or digital parish record that I add a Flag to the person.
I basically use the same system as David - Certs for direct ancestors and indices for more distant ones.

To tell the truth, my BMD indices entries do not have a Type, as it is relatively recently that I have started taking notice of this feature.

How do I create new Types? I could then do as suggested and use different Types for different situations.

Roger
User avatar
davidm_uk
Megastar
Posts: 740
Joined: 20 Mar 2004 12:33
Family Historian: V7
Location: St Albans, Hertfordshire, UK

Re: Change from Flags to Expressions for Diagram Icons

Post by davidm_uk »

Roger

I've checked AS and it only seems to allow Source Types of Birth, Burial, Census, Death and Marriage (see Options...General Settings). It does allow any of these Source Types to be automatically selected dependent on words in the Source Title, but this doesn't help us.

FH allows any Source Type to be created. If you type in a new one it automatically gets added to the drop down list.

So if you're using AS, as both of us do, then the only way to add icons for an extended range of types of source is to test the Source Title. I don't see any disadvantage in this, apart from a slightly more complex expression, and having to use a very consistent source naming convention, which is no bad thing in itself.
David Miller - researching Miller, Hare, Walker, Bright (mostly Herts, Beds, Dorset and London)
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Change from Flags to Expressions for Diagram Icons

Post by tatewise »

So to try and summarise:

Your BMD Index entries have Source records with no Source Type but you plan to start using some that are different from those used by AS as below (e.g. Birth Index, Marriage Index, Death Index), so they cannot be mistaken as Certificates/Parish Records.

All events (B,M,D,Bap,Bur,Cen) are entered via AS and thus have Source records with a Source Type (Birth, Marriage, Death, Baptism, Burial, Census) as defined by the AS > Tools > Options in the Source Type fields.

Icons are only required if the Source record has a Media document attached.

So the required Expressions test both the Source Type and existence of Media:
e.g.
=IsTrue(%INDI.BIRT.SOUR>_TYPE% = "Birth" and Exists(%INDI.BIRT.SOUR>OBJE>%))
and similarly for event tags DEAT, BAPM, BURI with types Death, Baptism, Burial.
=IsTrue(%CUR~FAMS>MARR.SOUR>_TYPE% = "Marriage" and Exists(%CUR~FAMS>MARR.SOUR>OBJE>%))
=IsTrue(%INDI.CENS[year=1831].SOUR>_TYPE% = "Census" and Exists(%INDI.CENS[year=1831].SOUR>OBJE>%))
and similarly for years 1841, 1851, 1861, etc.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Re: Change from Flags to Expressions for Diagram Icons

Post by rodit »

Mike and David

Thanks, fellows.

I can now create new Source Types to accommodate BMD Indices - that works. Thanks David

Mike. Your summary is correct. The new expressions will do exactly as I wanted.

Again, thanks to you both.

Roger
User avatar
trevorrix
Famous
Posts: 242
Joined: 17 Nov 2002 20:27
Family Historian: V7
Location: Suffolk, England

Re: Change from Flags to Expressions for Diagram Icons

Post by trevorrix »

I am also Changing from Flags to Expressions for Diagram Icons.

%INDI.CENS[year=1911]% works just fine for my source and flag named "1911 Census".

What expression would I need for my source and flag named "1911 Canada Census" please?
Trevor Rix
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Change from Flags to Expressions for Diagram Icons

Post by tatewise »

Trevor, the Expression will have to test the place and precede the %INDI.CENS[year=1911]% condition.
e.g.
=ContainsText(%INDI.CENS[year=1911].PLAC%,"Canada")

If you have Place names in organised comma separated parts then it is possible to be even more precise.
=IsTrue( TextPart(%INDI.CENS[year=1911].PLAC%,4) = "Canada" ) if 4th part is always a country.

You did not give the full Expression you are using now, so I cannot explain exactly how to adapt it.
It depends on whether you are testing Source Type, etc....
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
pwe
Famous
Posts: 232
Joined: 17 Feb 2003 21:04
Family Historian: V6.2

Re: Change from Flags to Expressions for Diagram Icons

Post by pwe »

I use the quality assessment of the source to determine whether or not a marker should be present. Primary assessment is the only one that generates a marker. A typical expression that I use is =IsTrue(%INDI.BAPM.SOUR.QUAY% = "Primary evidence")
So for me baptism primary evidence would be sight of or a copy of the relevant parish register page.
I have similar expressions for B M D bur and marr 1 Marr 2 and marr 3
The expression adds a small marker coloured red green or purple as appropriate with a letter on the marker to denote B or bp etc.

Peter
User avatar
trevorrix
Famous
Posts: 242
Joined: 17 Nov 2002 20:27
Family Historian: V7
Location: Suffolk, England

Re: Change from Flags to Expressions for Diagram Icons

Post by trevorrix »

Thanks Mike.

=ContainsText(%INDI.CENS[year=1911].PLAC%,"Canada") does work but as the %INDI.CENS[year=1911]% expression is already in place I end up with two "11" icons.

To answer your question, I have not used any expressions until the last couple of days. This is the first time I have tried to use an expression for the 1911 Canada Census. I think I am testing the Source Record Title "1911 Canada Census" that Ancestral Sources uses, but may be mistaken?
Trevor Rix
User avatar
trevorrix
Famous
Posts: 242
Joined: 17 Nov 2002 20:27
Family Historian: V7
Location: Suffolk, England

Re: Change from Flags to Expressions for Diagram Icons

Post by trevorrix »

Mike, It looks like your =ContainsText(%INDI.CENS[year=1911].PLAC%,"Canada") is picking up the "Canada" from "Calgary, Alberta, Canada" census place that Ancestral Sources creates alongside the date for that census "1 June 1911".

I would like the expression to pick up the "Canada" from my Source Record Title "1911 Canada Census" please. But not invoke the UK Census expression %INDI.CENS[year=1911]%.
Trevor Rix
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Change from Flags to Expressions for Diagram Icons

Post by tatewise »

See how_to:understanding_expressions|> Understanding Expressions that has examples for popular cases.
Those under Source Citation Fields should give sufficient clues...
i.e.
Take the example =ContainsText( %INDI.BAPM.SOUR>TITL%, "Baptism", STD )
and adapt it to =ContainsText( %INDI.CENS[year=1911].SOUR>TITL%, "1911 Canada Census", STD )

I don't understand what you mean by "not invoke the UK Census expression %INDI.CENS[year=1911]%".
That is NOT a UK Census expression but a Census with Date year 1911 expression.
I thought you wanted that for your source and flag named "1911 Census".

You did see my advice that your 1911 Canada Census condition must precede the %INDI.CENS[year=1911]% condition?
i.e. A more constrained condition must precede a less constrained condition.

However, you can make the condition order unimportant by making it more UK specific with an expresion such as =ContainsText( %INDI.CENS[year=1911].SOUR>TITL%, "1911 UK Census", STD ) or whatever is appropriate.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Change from Flags to Expressions for Diagram Icons

Post by tatewise »

Sorry Trevor, I must apologise.
Yesterday, I was focussed on other technicalities and did not recall correctly how Box Conditions operate.
Their order only matters if different Conditions govern the same Box Feature such as Fill Colour or Shape.

Otherwise, all Box Conditions are actioned independently.
So in your case, the UK and Canada Census conditions must be mutually exclusive.
In Venn diagram set theory terms they must not overlap.

Thus the two Box Condition expressions for 1911 Census Icons must be along the following lines:

=ContainsText( %INDI.CENS[year=1911].SOUR>TITL%, "1911 UK Census", STD ) for UK 1911 Census icon.
( You may have to use England instead of UK depending on your Source Title format. )

=ContainsText( %INDI.CENS[year=1911].SOUR>TITL%, "1911 Canada Census", STD ) for Canadian 1911 Census icon.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Post Reply