* Help with Query Issue

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
David Potter
Megastar
Posts: 1006
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Help with Query Issue

Post by David Potter »

Hi Forum
I'm trying to construct a Query for UK Census Fact by Census year and have the associated Place and Address details displayed. I don't want to use the Where Used Record Links or the List All Citations for a Source Plugins as this clouds my view with other data such as Names, Birth related info in the Data Ref Where Used field. This is so I can check for consistency as to what is in the Census Source Title and what is recorded in the Place and Address details. I have attached 3 screen shots of the query makeup and results. The query as it stands works fine for the first Census I have recorded, that being 1841. But for subsequent Census years I lose records, IE, not all Census years for say 1851 are displayed. This issue is exacerbated the further on the Census year projects.

I'm sure the issue lies in the Row statement, to which I have tried many things but still I do not get the right result.

What would be most useful is to be able to select for a specific Census Year in turn by changing the Row 'Contains' value each time.

Can anyone please help me with the correct Row statement to achieve this.

Many Thanks

David Potter
Attachments
Capture1.JPG
Capture1.JPG (30.25 KiB) Viewed 9943 times
Capture2.JPG
Capture2.JPG (38.27 KiB) Viewed 9943 times
Capture.JPG
Capture.JPG (299.42 KiB) Viewed 9943 times
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Help with Query Issue

Post by tatewise »

The main problem is that you are using an Individual type of Query.
That gets VERY complicated with multiple instance facts such as CENS[1], CENS[2], CENS[3], etc.

So you need to switch to the Fact type of Query that works fact by fact.
See how_to:creating_a_query#query_types|> Query Types.

If necessary I can give you advice on using the special CENS[year=1841] style of index.

For it to work satisfactorily the first Citation must refer to the primary Source record for the Census.
i.e. ...CENS.SOUR[1]> and not ...CENS.SOUR[2]>
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
David Potter
Megastar
Posts: 1006
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Help with Query Issue

Post by David Potter »

Thank you Mike. Let me see if I can work it out. If not I'll come back for further assistance.

BR

David
avatar
David Potter
Megastar
Posts: 1006
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Help with Query Issue

Post by David Potter »

Hi Mike
A little better using the Fact Type Query in that the Source record counts are now correct. However, the query also captures facts for Birth where the Census records supports that Event. But I can't find a way to suppress those Fact types. The filter for %Fact% doesn't allow any conditions to be input? Please see attached images.

I was going to exclude if %Fact% contains BORN, but I'm not allowed to input that condition?
Any help would be welcome...
Attachments
Capture1.JPG
Capture1.JPG (230.42 KiB) Viewed 9878 times
Capture.JPG
Capture.JPG (42.09 KiB) Viewed 9878 times
avatar
David Potter
Megastar
Posts: 1006
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Help with Query Issue

Post by David Potter »

Hi Mike
I just re-read your earlier post and it seems I have done something different than what you suggested. Sorry. It looks like I need further guidance from you. I don't think my data meets the criteria for Citation Order.
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Help with Query Issue

Post by tatewise »

The Fact Query approach is basically correct.

To cope with multiple Source Citations you will need such as:
Add if %FACT.SOUR[2]>_TYPE% matches 'Census 1841'
Add if %FACT.SOUR[3]>_TYPE% matches 'Census 1841'

To select particular facts you need a Rows tab filter such as:
Exclude unless =FactLabel(%FACT%) matches 'CENS'

But take care with the sequence of filters and which Conditions you use.

BTW: To avoid keep editing the Query you could use the Parameter prompt to ask for the Census Type text.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
David Potter
Megastar
Posts: 1006
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Help with Query Issue

Post by David Potter »

Thank you Mike. Appreciate your help educating me on this topic. I've done quite well up to now. But this one out foxed me.

David
avatar
David Potter
Megastar
Posts: 1006
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Help with Query Issue

Post by David Potter »

That all worked nicely Mike. Thanks Once again.

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

Re: Help with Query Issue

Post by tatewise »

Do you also have OCCUpation facts citing those same Census Source records?
Do they also need their Place fields to be checked?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
David Potter
Megastar
Posts: 1006
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Help with Query Issue

Post by David Potter »

Hi Mike. I tend not to record places against Census records unless it is certain the occupation occurs at the Place and Address given. EG Servant or Domestic Maid. Still no real certainty but that's how I do it.
But then there's the Census Residence Fact. I would need to check those. Do i just change the Fact Label to be Res or Residence?

Thanks

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

Re: Help with Query Issue

Post by tatewise »

You must use whatever Label is defined in Tools > Fact Types.
There are actually three functions you could have used:
=FactName(%FACT%) and =FactLabel(%FACT%) and =FactAbbrev(%FACT%)
They relate to the three Tools > Fact Types definition fields: Name and Label and Abbreviation

I cannot remember if we have discussed this before, but what do you record in the Residence fact that is any different than the Census fact?
Usually, users don't use both, as the Census Place & Address may not be the person's normal residence, and if it is then it is simply duplicating the same information.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
David Potter
Megastar
Posts: 1006
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Help with Query Issue

Post by David Potter »

Hi Mike. You raise a very good point, unfortunately this is a consequence of me diving in with AS and not fully realising the consequences or best approach to use such a tool. I will make some data checks to ensure duplication is 100% which I think it will be; and then start a further clean up task to remove those Residence Facts related to Census Source Records.
Like many of us - I can't wait until Release 7 arrives. I'm hoping it will contain new or improved tools (particularly for handling Sources and Citations) whereby I could maybe start afresh and have complete consistency using just one software tool. Also a lot of my research came over from TMG and along with the data came bad research techniques on how best to do things. Learning the Hard Way as they say.

Thanks for that Tip...

David
User avatar
ColeValleyGirl
Megastar
Posts: 5465
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Help with Query Issue

Post by ColeValleyGirl »

We already know that FH7 will have source templates... I'm looking forward to the long slog of converting my sources into template-based sources. It will be worth it.
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Help with Query Issue

Post by tatewise »

David, with your recent discoveries, you know how to list all Residence facts linked to a Census Source.
In the Result Set just select them all and hit the Delete key, and POOF they are gone.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
David Potter
Megastar
Posts: 1006
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Help with Query Issue

Post by David Potter »

@Helen - Yes should be good, but the wait is excruciating.

@Mike - I was going to ask about mass delete so many thanks for that Tip also.

David
avatar
jelv
Megastar
Posts: 565
Joined: 03 Feb 2020 22:57
Family Historian: V7
Location: Mere, Wiltshire

Re: Help with Query Issue

Post by jelv »

I've attached a query and property box tab that I've found useful while working with census data.
Attachments
JE All Census places by year.fhq
(2.06 KiB) Downloaded 152 times
FH Property Box - Census UK tab for Individuals.fhpbt
(3.19 KiB) Downloaded 173 times
John Elvin
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Help with Query Issue

Post by tatewise »

@jelv ~ You could usefully add a Column to your Query for 1939.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
jelv
Megastar
Posts: 565
Joined: 03 Feb 2020 22:57
Family Historian: V7
Location: Mere, Wiltshire

Re: Help with Query Issue

Post by jelv »

I also have this query which shows the individuals ages at all the censuses (I've entered them using Ancestral Sources). If there is a census fact without an age it shows ???
Attachments
JE All individuals ages at census events.fhq
(4.1 KiB) Downloaded 159 times
John Elvin
avatar
David Potter
Megastar
Posts: 1006
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Help with Query Issue

Post by David Potter »

Hi John
Thank you very much for those queries. I'll get them loaded and test them out.

Best regards

David
avatar
karinf
Gold
Posts: 11
Joined: 29 May 2020 10:31
Family Historian: V7
Location: Worcester, UK

Re: Help with Query Issue

Post by karinf »

Thanks John Elvin for your customised queries and property box tab included in this thread. They do things very useful for me, but which I hadn't as yet got round to investigating how to do - if that makes sense!

However, with the Property box Census UK tab 1891 seems to have just an Occupation box and no Age or Place boxes. I've tried this on several individuals so don't think it is something I am doing wrong or problems in my data, but apologies if it is.

The more I look into Fh, the more impressed I am to find all the different ways I can look at and analyse my data. And also with the help provided by you all. Although I could still be in my 30-day trial period I have gone ahead and bought a copy, and with the help of some of the plugins am beginning to get my information a bit more logically entered, which in turn is showing up gaps, patterns etc. I'm a very happy, if busy, person!
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Help with Query Issue

Post by tatewise »

See fhugdownloads:contents:property_box_tabs_census_uk|> Property Box Tab ~ Census UK download that shows Occupation, Place & Address (but not Age).

Age could be added but would make the Census UK tab much longer unless you replaced or merged Place &/or Address.

Were you aware of the fhugdownloads:index|> Downloads and Links section of the Knowledge Base?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
David Potter
Megastar
Posts: 1006
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Help with Query Issue

Post by David Potter »

I noticed the same problem. I have fixed the property box issues. I will load the object shortly for you to download
avatar
David Potter
Megastar
Posts: 1006
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Help with Query Issue

Post by David Potter »

Hi Karinf

Try this modified version of John's Census UK Property Box. Remember the 1939 Register did not ask for age info. So this field is deliberately left blank. Although it could be calculated of course.

David
Attachments
FH Property Box - Census UK tab for Individuals.fhpbt
(3.71 KiB) Downloaded 84 times
avatar
karinf
Gold
Posts: 11
Joined: 29 May 2020 10:31
Family Historian: V7
Location: Worcester, UK

Re: Help with Query Issue

Post by karinf »

Thanks David for the updated Property tag box, and Mike for reminding me about the Downloads section of the Knowledge base. I had already found this but hadn't investigated it fully as I want to concentrate on getting my current data a bit more consistently entered before I get too sidetracked by analysing the data or adding new - it's very tempting (I'm a bit like a child in a toyshop!) but I'm hoping that once I have facts and sources more consistently entered I can produce more meaningful and useful results. However, I did download the queries and tab from this thread, as I was worried that if I did not I would have trouble finding them again.
Post Reply