* Mass Update of Source Data Fields

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: 1010
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Mass Update of Source Data Fields

Post by David Potter »

Hi Forum

I would like to know if there is a mass update technique to apply a consistent value into a field within the Source record?

I would like to mass update the Short Title of the Source record and change one value for another for a number of records. See the screen shot attached. In the example attached I would like to quickly update all 'GRO Full Certificate' to be 'GRO Birth Certificate'. Is there a simple way to do this. I have other examples whereby this technique would be very useful, I just need some guidance as to how it can be done.

Many thanks.
Attachments
Capture.JPG
Capture.JPG (68.65 KiB) Viewed 7204 times
avatar
David Potter
Megastar
Posts: 1010
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Mass Update of Source Data Fields

Post by David Potter »

I solved the change requirement by using the Search and Replace plug-in. But how would I mass populate that same field with a constant value when it is already empty?

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

Re: Mass Update of Source Data Fields

Post by tatewise »

David, the problem is not exactly that the field is empty, but that the field does not even exist.
If the field does exist, but is empty, then Search and Replace will do the job.
So the problem is how to create such empty fields, but there is no solution short of writing a custom Plugin.

However, going back to your requirement, it seems unlikely that you would want EVERY empty Short Title to be given the same value. Surely it would only be a selected subset of Source records. While a different selection of Source records would require a different value for their empty Short Title fields.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
David Potter
Megastar
Posts: 1010
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Mass Update of Source Data Fields

Post by David Potter »

Hi Mike

Thanks for the reply. I'm not entirely sure what you mean when the say the Short Title field does not exist - surely it is a database field like many others or have I misunderstood?

Your last paragraph describes my need accurately - I want to use the Short Title field to hold variable information describing the sub-detail behind the Source Type, Birth, Marriage, Death, etc. Examples:

Type Birth
Short Title values = 'GRO Birth Certificate', 'GRO Birth Index', 'Other - To be Defined'

Type Death
Short Title values = 'GRO Death Certificate', 'GRO Death Index', 'Other - To be Defined'

Obviously - I would prefer some sort of mass update to populate this field, but if the only tool available is a custom plug-in then I'm stuck with manual updates.

I thought perhaps there may be some function in the Named List or other area of FH that might provide some work around to manual entry.

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

Re: Mass Update of Source Data Fields

Post by Jane »

Personally I use the Source Type field to contain the Type of source, which is what you appear to be putting in the Short title. It's managed so it auto-fills which helps with consistency.

Empty fields are not stored in Gedcom so no space is wasted on empty data fields, this is why Mike is saying you need a plugin to create the field and populate it.

Anyone can write plugins so there is nothing to stop you writing one if you want one.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
avatar
David Potter
Megastar
Posts: 1010
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Mass Update of Source Data Fields

Post by David Potter »

Hi Jane

Ah - I see your point. I have kept the Source - Type fairly simple to keep it aligned with AS. I'll recheck the possibilities of using a wider group of source types as you suggest.

Thank you very much.
User avatar
tatewise
Megastar
Posts: 28410
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Mass Update of Source Data Fields

Post by tatewise »

AS can be customised to use whatever Source Type you prefer.

So for Birth Certificates which are what AS handles it could be changed to GRO Birth Certificate.
Although I would prefer just Birth Certificate to cater for foreign births not held by GRO.
Similar customisations apply to each type of AS document capture.

I have a custom Plugin called Set Source Type From Title that detects Source records matching some particular Title text and Type value, that substitutes a nominated Type value.
e.g.
If the Title contains 'UK Birth' and the Type is 'Birth' then set Type to GRO Birth Certificate.

You just have to edit the Plugin script to define what Titles and Types you want changed.
Is that of any interest?
Its current drawback is that is does not produce a Result Set listing what it has changed, but that could be easily added.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
David Potter
Megastar
Posts: 1010
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Mass Update of Source Data Fields

Post by David Potter »

Hi Mike/Jane

I have followed Jane's suggestion and tweaked the AS Source Type settings for Birth, Marriage and Death. So going forward this should clear up the issue. So it's the existing records I need some sort of adjustment/clean up approach. So yes please to your offer of this Plug-In Mike.

Still on the quest for best practice usage...

Thank you both very much.
User avatar
tatewise
Megastar
Posts: 28410
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Mass Update of Source Data Fields

Post by tatewise »

Regarding best practice for Source Citations did you study Citing Sources: Method 1 and Method 2? Maybe worth a revisit now.

See the Attachment Set Source Type From Title Plugin Version 0.1 Date 17 Aug 2017.
I've updated the script to add a Result Set but you must edit the lookup table near the top of the script to meet your needs.
Before testing the Plugin use File > Backup/Restore > Small Backup just in case, or work on a Copy of your Project!
After testing the Plugin use Edit > Undo Plugin Updates before closing FH to reverse all changes.
For general advice see Getting Started Writing Plugins.
Last edited by tatewise on 31 Jan 2024 18:34, edited 1 time in total.
Reason: Attachment deleted - contact Mike Tate if needed
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
David Potter
Megastar
Posts: 1010
Joined: 22 Jun 2016 15:54
Family Historian: V7
Location: United Kingdom

Re: Mass Update of Source Data Fields

Post by David Potter »

Thank you Mike.

Yes a recap would be appropriate at this stage, thanks for the tip. Thanks for the Plug-In and related advice.

Very much appreciated.
Post Reply