* Census Flags

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
stewart60
Diamond
Posts: 58
Joined: 20 May 2010 10:23
Family Historian: V7

Census Flags

Post by stewart60 » 16 Mar 2022 18:12

I am returning to use FH after a long break
I have version 7.0.11 and the latest version of Ancestral Sources.

I had previously been guided as how to create a custom query to list each of the censuses '1841 UK Census' and so on each with a different flag icon.

However, on entering a census recently using AS, I found that the censuses were now listed differently such as ' Wales Census 1841' 'England Census 1841' and so on.
My census flags didn't get added automatically!

How do I rectify the situation please?

Do I simply add a new custom query to list ' Wales Census 1841' ' England Census 1841'
Do I delete the old entries (if I do this then will the census flags which I previously listed get deleted as well? :o

Finally would someone kindly repeat the process to write a new custom query for the census flag.

Thank you

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

Re: Census Flags

Post by tatewise » 16 Mar 2022 18:41

There are several issues there and maybe your data needs a makeover to use the latest features.

First a little terminology. You mentioned "flag icon".
However, Record Flags and Diagram Box Icons are two separate entities that are often confused.
  • A Record Flag is a data item that is attached to Individual Records and can be searched for in Queries.
  • A Diagram Box Icon is one of several Box Features including Box Colour and Text Colour that can be conditionally displayed depending on Record Flags or Expressions.
What did your custom Queries list? Was there one for each Census year?
Is the objective to list each Individual who has an 1841 Census Event?
And similarly for an 1851 Census Event, 1861 Census Event, etc...

I suspect in all cases, regardless of whether 'Wales Census 1841' or 'England Census 1841' and so on, your Facts tab simply has multiple Census events, each with the appropriate census Date, and Place & Address details for the location of the household.
i.e. 'Wales' and 'England' only appears in the Place field.
Please confirm.

If that assumption is correct, you don't actually need any Record Flags at all and can use an alternative technique that uses the Census events directly.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
stewart60
Diamond
Posts: 58
Joined: 20 May 2010 10:23
Family Historian: V7

Re: Census Flags

Post by stewart60 » 16 Mar 2022 20:28

Thanks for the reply Mike,

Yes, the custom Queries which I have do list one for each year.
Also the objective was to list individuals with a census event for any particular year and then automatically marked on the charts/diagrams page.

In Diagrams>Options>Boxes is listed the individual census years together with the census icons.

In the Facts Tab all the census entries for the individual being looked at are there, thanks to Ancestral Sources.
Yes ,the date, place and address are correctly listed.

I would still like to continue adding the census flags automatically after entering the census data via Ancestral Sources and then as shown in the diagram. I find the census flag display really useful.

Thanks
Stewart

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

Re: Census Flags

Post by tatewise » 16 Mar 2022 20:41

Stewart, when you say "I find the census flag display really useful" do you really mean that?
OR
Do you mean you find the Census Icon shown on Diagram Boxes really useful?

Do you ever actually display the Census Record Flag?

As I tried to explain, Census Record Flags and Diagram Census Icons are two different entities.

It is possible to get Census Icons on Diagram Boxes directly from the existence of Census events without any Record Flags, and I can explain how if you are interested.
Once set up you never need to worry about Census Record Flags ever again.
As soon as the Census events are added, then the Diagram Box Census Icons will appear automatically.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
stewart60
Diamond
Posts: 58
Joined: 20 May 2010 10:23
Family Historian: V7

Re: Census Flags

Post by stewart60 » 16 Mar 2022 20:57

Yes Mike I do mean that I find the Census Icon shown on Diagram Boxes really useful! :D

Please tell me how to get Census Icons on Diagram Boxes directly from the existence of Census events without any Record Flags!

Thank you

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

Re: Census Flags

Post by tatewise » 16 Mar 2022 21:29

The FHUG Knowledge Base article Using Icons goes into the details.
However, here is a short summary...

I think you know that with a Diagram displayed the Diagram > Options > Boxes tab governs the display of Icons.
Currently, you have a Record Flag Condition with a tab below for each Census Flag that invokes an Icon.

We are going to replace that with an Expression Condition for each Census year.
So click << Add Condition and choose Expression.
In the Expression box enter %INDI.CENS[year=1841]% which is true only if a person has a Census fact with a Date in 1841.
If you want to be more rigorous and only invoke an Icon when the Census fact also has a suitable Source Citation then the Expression is =IsTrue( %INDI.CENS[year=1841].SOUR>_TYPE% = "Census" )
That is testing that the Census fact dated in 1841 has its 1st citation linked to a Source record with Generic Type 'Census'.
Having entered the desired Expression click OK and in the Box Features choose the same 1841 Census Icon as before.
BTW: FH V7 has a set of coloured Number Labels that work well as Census Icons.

You must repeat the above process for the Census year each decade from 1851 through to 1921 plus 1939.

If you have added Census facts recently using AS but without Census Record Flags they should get Box Icons after adding the above Expressions.

When happy that is working, open the Diagram > Options Boxes tab, select the Record Flag Condition and use Delete Condition >> to remove all the Census Record Flag conditions.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
stewart60
Diamond
Posts: 58
Joined: 20 May 2010 10:23
Family Historian: V7

Re: Census Flags

Post by stewart60 » 16 Mar 2022 21:37

Thank you very much

User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Re: Census Flags

Post by rodit » 17 Mar 2022 03:50

As an addition to this topic, I have ancestors in Canadian censuses of 1911, 1916, 1921 and 1926.
In Diagrams I have used =IsTrue( %INDI.CENS[year=1841].SOUR>_TYPE% = "Census" ) etc, for all the English censuses as per Mike's response, and for the Canadian ones I have created the following (rightly or wrongly) =ContainsText(%INDI.CENS[year=1911].SOUR>TITL%,"1911 Canada Census",STD). with the relevant year and icon.
My problem is that I get BOTH 1911 icons and, now, BOTH1921 icons against those Canadian people who, in fact, only appeared in the Canadian censuses.
How do I resolve this, please?
Cheers
Roger

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

Re: Census Flags

Post by tatewise » 17 Mar 2022 10:16

Roger, as you probably realise, both Expressions are true for Canadian Census events because they also have the Source record Generic Type = Census.
So how do you think you could alter that first generic Expression to be unique for UK Census events in the same way that the second Expression is unique for Canadian Census events?
What is the Title of the Source record for those UK Census events?
Is that enough clues?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Re: Census Flags

Post by davidf » 17 Mar 2022 10:24

rodit wrote:
17 Mar 2022 03:50
My problem is that I get BOTH 1911 icons and, now, BOTH1921 icons against those Canadian people who, in fact, only appeared in the Canadian censuses.
Which looking at your two formulae is (at least programmatically) correct - the "English Test" would be "passed as TRUE" by any census for the year concerned where the type is set to "Census".

I would solve it by amending the "English Test" to match the form of the Canadian Test.
=ContainsText(%INDI.CENS[year=1911].SOUR>TITL%,"1911 England & Wales Census",STD).

You need to ensure that your "Source naming conventions" are robust; Ancestry refer to the "England and Wales Census" and separately to the "Scotland Census" (which to me makes sense because as a lumper these two sources are different in both physical repository and in the online availability of images, so my workflow can be different). Find My Past has "England, Wales and Scotland Census". You may thus need to duplicate some of your tests to catch all possibilities.

If you have duplicate sources say Ancestry and FMP, I think you then risk duplication of icons by another route. Amending the tests to only test against SOUR[1] may solve this.

The other matter to note is that the use of "TYPE" is not fixed. As a lumper (with fewer sources with plainer titles), saying TYPE="Census" is superfluous, so I use TYPE to indicate whether the particular lumped source is:
  • An actual physical document
  • A microfilm of a document
  • An online full transcription with online images
  • An online partial transcription ...
  • etc.
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)

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

Re: Census Flags

Post by tatewise » 17 Mar 2022 10:44

Thank you davidf for giving the solution, but I was hoping Roger would be able to think it through for himself, which is a better learning experience.

The currently presented Expressions already only test the 1st Source Citation SOUR[1] so no amendment is necessary.

It is also possible to test a variety of fields to differentiate the census year & country, e.g. TITL, ABBR, PUBL, REFN, _TYPE

Certainly, the Expressions for 'lumper' Source Citations may need to be different and could test Citation fields rather than Source record fields.
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: Census Flags

Post by rodit » 05 Apr 2022 06:58

Mike and David
Thanks for your responses. I have been away travelling, so have only just opened them.
Mike
If I had wanted a lesson on how to think through Expressions I would have asked for it. I just use FH to record family stuff, without wishing to become an expert in programming which I believe was/is your profession. All I asked for was a solution to my problem. I'm afraid my octogenarian brain sometimes cannot puzzle through the intricacies of FH's hidden mysteries.
David
Thank you very much for your answer. I had the idea that it may be so, and shall go through it and apply as necessary.
Regards
Roger

Post Reply