* How do I create a custom query to find a specific data field?

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile
Post Reply
avatar
Ninabee
Gold
Posts: 14
Joined: 20 Dec 2015 21:54
Family Historian: V7
Location: Upstate NY, USA

How do I create a custom query to find a specific data field?

Post by Ninabee » 21 Feb 2021 15:20

I'm trying to find and eliminate a few uncategorized data fields (UDFs) that are cluttering up my database from a very old import. Unfortunately, when I try to use the UDF list plug-in, FHv7 crashes. I think it's because I have probably hundreds of thousands of these UDFs. So, I'm thinking I could do queries for the ones that appear over and over (for example, _PRIM).

Thank you in advance for help creating this query.

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

Re: How do I create a custom query to find a specific data field?

Post by tatewise » 21 Feb 2021 15:42

Have you updated to the latest UDF List plugin Version 1.1 from the Plugin Store?
Earlier version 1.0 will not run in FH V7.

This is generally true for many plugins and is highlighted in the Help in Notes on Upgrading to Version 7.

If Version 1.1 of that plugin is crashing FH then that needs investigation and fixing.
Exactly what are the symptoms?
Do you get any error messages?
Is a progress bar displayed?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Ninabee
Gold
Posts: 14
Joined: 20 Dec 2015 21:54
Family Historian: V7
Location: Upstate NY, USA

Re: How do I create a custom query to find a specific data field?

Post by Ninabee » 21 Feb 2021 16:08

Have you updated to the latest UDF List plugin Version 1.1 from the Plugin Store?
Yes, I am running 1.1.
Exactly what are the symptoms?
I do get a progress bar. That's all I see--a progress bar. While initially the progress bar moves, it stops moving and stays stuck in one place. This place varies, anywhere from 1/4 to 1/3 to 1/2 of the bar. I wait a while, and it doesn't move. When I click on the progress bar, I get the Windows10 popup saying that FH is not responding; do I want to wait or close the program? I've tried waiting, but still nothing.
Do you get any error messages?
No.

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

Re: How do I create a custom query to find a specific data field?

Post by tatewise » 21 Feb 2021 16:46

If you have a large Project and there really are thousands of UDF then it will take some time to find them all.

Please leave the plugin running for as long as possible to see if it finishes.

It is not easy to write a Query to find UDF unless you have some idea of where they exist.
The plugin does a more exhaustive search than is possible with a single Query.

Do you have some idea where for example those _PRIM tags exist?
I suspect they are associated with Media but what items are the Media attached to?
Individual records, Facts, Citations, Source records, ...?

The reason that is important is an Individual Query cannot find all Fact, Citation or Source related Media.
Similarly, a Fact Query cannot find Individual, Family, or Source record Media.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Ninabee
Gold
Posts: 14
Joined: 20 Dec 2015 21:54
Family Historian: V7
Location: Upstate NY, USA

Re: How do I create a custom query to find a specific data field?

Post by Ninabee » 21 Feb 2021 16:57

Please leave the plugin running for as long as possible to see if it finishes.
OK, I'll start it up and go do something else.
Do you have some idea where for example those _PRIM tags exist?
I realized after I posted the original message that they are fields of different individual and family record events. For example, %INDI.BIRT._PRIM%, %FAM.MARR._PRIM%

Right now I'm abandoning the idea of creating a query and instead hoping that being more patient with the UDF plugin will get the result that I want. I'll check back later.

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

Re: How do I create a custom query to find a specific data field?

Post by tatewise » 21 Feb 2021 17:17

Do you have multiple facts like Birth, Marriage, Death, etc, where _PRIM nominates the primary/preferred one?
If so, then rather than remove those UDF perhaps converting to Fact Preferred Flags would be better?

If you don't have multiple facts like that then removing those UDF is best and a Fact Query would find them.
I can explain how to create such as Query if the Plugin does not work.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Ninabee
Gold
Posts: 14
Joined: 20 Dec 2015 21:54
Family Historian: V7
Location: Upstate NY, USA

Re: How do I create a custom query to find a specific data field?

Post by Ninabee » 21 Feb 2021 17:38

They are long out of date, so at this point I prefer to remove them.

ETA--and I have been gradually switching to a single fact with conflicting sources attached to the same fact, making notes about significant differences.

avatar
Ninabee
Gold
Posts: 14
Joined: 20 Dec 2015 21:54
Family Historian: V7
Location: Upstate NY, USA

Re: How do I create a custom query to find a specific data field?

Post by Ninabee » 21 Feb 2021 18:40

The UDF plugin finished its work, after about 45 minutes, very roughly speaking. I had over 1.2 million UDFs, mostly duplicative source data that had already been converted to defined data.

Thank you again for your help.

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

Re: How do I create a custom query to find a specific data field?

Post by tatewise » 21 Feb 2021 19:30

So presumably they are all deleted now?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Ninabee
Gold
Posts: 14
Joined: 20 Dec 2015 21:54
Family Historian: V7
Location: Upstate NY, USA

Re: How do I create a custom query to find a specific data field?

Post by Ninabee » 22 Feb 2021 00:08

Yes, backed up and proceeded cautiously at first, then became confident enough to move faster. Thank you also for making the plug-in. I could never have eradicated them without it.

ETA, thanks to Calico Pie and Jane Taubman.
Last edited by Ninabee on 22 Feb 2021 12:15, edited 1 time in total.

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

Re: How do I create a custom query to find a specific data field?

Post by tatewise » 22 Feb 2021 09:58

I cannot take credit for the Plugin as the Author is Calico Pie but I think Jane Taubman actually updated it.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply