* Query: count of multiple name occurances
Query: count of multiple name occurances
Hi, I want to do a query to show a) who's got more than one name entry, and b) how many Name entries that person has (some of them are legitimate, some are mistakes). How do I do this, please? I know the filter goes in the Rows tab, and the count in the Columns tab, but I don't know what the syntax is, and if this can be done for Names as you can't query Name in a Fact query type.
Many thanks,
Isabel
Many thanks,
Isabel
Last edited by tatewise on 01 Apr 2022 16:20, edited 1 time in total.
Reason: Changed Subject from 'fact' to 'name'
Reason: Changed Subject from 'fact' to 'name'
- tatewise
- Megastar
- Posts: 27082
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Query: count of multiple name occurances
The snag is that Queries are not good at counting things. For that you need a Plugin.
Since this is a temporary investigation Query you need a quick and dirty solution.
So forget about the Rows tab and just concentrate on the Columns tab in an Individual type Query.
After the usual Individual and Record Id ( =RecordId() ) columns, add a column for each Alternate Name entry.
e.g.
Heading Expression
Name 2 %INDI.NAME[2]% Sort: Descending
Name 3 %INDI.NAME[3]%
Name 4 %INDI.NAME[4]%
et seq, for as many Alternate Names you think may exist.
Then in the Result Set you will see entries in the appropriate Columns for each name.
Since this is a temporary investigation Query you need a quick and dirty solution.
So forget about the Rows tab and just concentrate on the Columns tab in an Individual type Query.
After the usual Individual and Record Id ( =RecordId() ) columns, add a column for each Alternate Name entry.
e.g.
Heading Expression
Name 2 %INDI.NAME[2]% Sort: Descending
Name 3 %INDI.NAME[3]%
Name 4 %INDI.NAME[4]%
et seq, for as many Alternate Names you think may exist.
Then in the Result Set you will see entries in the appropriate Columns for each name.
Last edited by tatewise on 01 Apr 2022 16:21, edited 1 time in total.
Reason: Changed Subject from 'fact' to 'name'
Reason: Changed Subject from 'fact' to 'name'
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- jimlad68
- Megastar
- Posts: 911
- Joined: 18 May 2014 21:01
- Family Historian: V7
- Location: Sheffield, Yorkshire, UK (but from Lancashire)
- Contact:
Re: Query: count of multiple name occurances
try this, gives lots of columns including up to 4 alternate names, just add extra alt name columns if you want more.
Edit - P.S. for count, show your name columns in reverse order, then sort them all "desending", that should group similar count of names together.
Edit - P.S. for count, show your name columns in reverse order, then sort them all "desending", that should group similar count of names together.
Last edited by tatewise on 01 Apr 2022 16:21, edited 1 time in total.
Reason: Changed Subject from 'fact' to 'name'
Reason: Changed Subject from 'fact' to 'name'
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68
- jimlad68
- Megastar
- Posts: 911
- Joined: 18 May 2014 21:01
- Family Historian: V7
- Location: Sheffield, Yorkshire, UK (but from Lancashire)
- Contact:
Re: Query: count of multiple name occurances
Updated attachment with more name cols and sort
- Attachments
-
temp many names2.fhq- (2.11 KiB) Downloaded 39 times
Last edited by tatewise on 01 Apr 2022 16:22, edited 1 time in total.
Reason: Changed Subject from 'fact' to 'name'
Reason: Changed Subject from 'fact' to 'name'
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68
Re: Query: count of multiple name occurances
Might there be a demand for a "count" type function in FH?
Count number of descendants
Count number of living descendants
Count number of great grandparents
Count number of spouses
even possibly
Count no of a fact for a person (e.g. Census entries)
=ChildCount(%INDI%) & =MediaCount(%INDI%) exist so presumably coding specific counts is possible, but is there a demand for a generalised function?
Count number of descendants
Count number of living descendants
Count number of great grandparents
Count number of spouses
even possibly
Count no of a fact for a person (e.g. Census entries)
=ChildCount(%INDI%) & =MediaCount(%INDI%) exist so presumably coding specific counts is possible, but is there a demand for a generalised function?
Last edited by tatewise on 01 Apr 2022 16:22, edited 1 time in total.
Reason: Changed Subject from 'fact' to 'name'
Reason: Changed Subject from 'fact' to 'name'
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)
Re: Query: count of multiple name occurances
Ooh love you guys! Many thanks Jim, will have a play 
Re: Query: count of multiple name occurances
Adding
Exclude if %INDI.NAME[2]%
to the Rows tab restricts the query to just those with alternate names.
The beauty of Jim's query is that double clicking one of the alternate names opens the property box on the All tab with the alternate name selected.
Also if you see an alternate name of just a comma it means the contents of a name have been deleted leaving the empty field behind.
Exclude if %INDI.NAME[2]%
to the Rows tab restricts the query to just those with alternate names.
The beauty of Jim's query is that double clicking one of the alternate names opens the property box on the All tab with the alternate name selected.
Also if you see an alternate name of just a comma it means the contents of a name have been deleted leaving the empty field behind.
John Elvin
Re: Query: count of multiple name occurances
Thanks, John 
Re: Query: count of multiple name occurances
It's also possible to include columns for Given Name Used (%INDI.NAME[1]._USED%) and Nickname (%INDI.NAME[1].NICK%) if you want to see other alternative names for people.