* Running queries from code or another query

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
SpencerDudeUK
Diamond
Posts: 91
Joined: 01 Jun 2018 15:07
Family Historian: V7

Running queries from code or another query

Post by SpencerDudeUK » 30 Mar 2019 10:05

I've utilised a very useful piece of code to establish whether someone has a census entry:
Exclude if %INDI.CENS[year=1841]% is null.
I've created something like this for each census, and the result looks like the picture attached.
Picture1.jpg
Picture1.jpg (8.11 KiB) Viewed 3032 times
However, what I would really like to do is run them all together, as opposed to having to open each one and set flag on row records - is this possible - either by combining the queries into one big query, or developing code to run each query in turn?

User avatar
Jane
Site Admin
Posts: 8442
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Running queries from code or another query

Post by Jane » 30 Mar 2019 10:34

Why don't you simply use the Expression in the Diagram rather than setting a flag first?

On the Box tab add an Expression and put

%INDI.CENS[year=1841]%

in and then set your icon preferences.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
SpencerDudeUK
Diamond
Posts: 91
Joined: 01 Jun 2018 15:07
Family Historian: V7

Re: Running queries from code or another query

Post by SpencerDudeUK » 30 Mar 2019 10:52

Brilliant! Thanks - that will solve all the questions :o
Thanks very much for the help - prompt reply. I'm always amazed how quickly this forum helps you with questions :)

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

Re: Running queries from code or another query

Post by tatewise » 30 Mar 2019 11:07

Checkout how_to:using_flags_and_icons_and_expressions|> Using Flags and Icons and Expressions that explains the principles and provides worked examples including your Census case.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

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

Re: Running queries from code or another query

Post by Gowermick » 30 Mar 2019 11:55

As Miketate says, this has been brought up before, and someone has even done the hard work for you, as there are some sets of icons available in fhugdownloads:diagramicons|> Downloads and Links ~ Diagram Icons for you to download. :D
Mike Loney

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

Post Reply