* Convert a FACT from Individual record type to family record type.

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
User avatar
phillip_leslie
Gold
Posts: 21
Joined: 30 Jun 2022 07:49
Family Historian: V7
Location: Huddersfield, West Yorkshire, UK

Convert a FACT from Individual record type to family record type.

Post by phillip_leslie »

Hi everyone,

I have recently migrated from TMG and after spending many weeks of tidying up my data in FH have just identified a problem with some information that I record for Marriage Registration. This was configured in TMG as a Marriage tag but has converted into FH as a fact with an individual record type, I have 640 records of these records. There is always a witness for both the Groom & Bride.

I would like to convert them from individual record types (fact name Marriage1) into family record types (fact name Marr-Reg) as this appears to be more logical in FH, and I can maintain them as shared-events using the individual's Property Box main tab, however I can find no way of converting them.

Does anyone have any suggestions for a plug-in; existing or new?

Many Thanks

Phillip
Attachments
From Fact.jpg
From Fact.jpg (73.82 KiB) Viewed 2078 times
To Fact.jpg
To Fact.jpg (72.16 KiB) Viewed 2078 times
User avatar
Mark1834
Megastar
Posts: 2458
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by Mark1834 »

Welcome to FHUG Phillip - you seem to be well up the learning curve for Facts definitions.

I'm not familiar with TMG, but to clarify please -
  • From your description, it appears that that the Family record connecting bride and groom always exists, so will not need to be created?
  • Are there any other witness roles that need to be considered?
  • As I read it, each Marriage Registration fact is duplicated for the bride and groom, the only difference being that the witness roles are reversed. Is that correct, or have I misunderstood how you have set it up?
My first thought is a short plugin that loops through Family records and creates a Marriage Registration fact if the details exist for either partner, copies the details from the two individual facts, and then deletes them.

A more fundamental question as background - why do you create a separate Marriage Registration fact? Doesn't it just duplicate most of the details of the Marriage fact?
Mark Draper
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by tatewise »

Phillip posted a similar question in the groups.io Email forum and I suggested he posted here where exchanging screenshots and plugin prototypes will be much easier.
There are a couple of variances between the posting here and the one in groups.io.
Firstly, the Individual Event Name has changed from Marr-Reg to Marriage1 and such details are crucial.
Secondly, the requirement to remove the Fact Witnesses when copying to the Family Event is not mentioned

I was thinking along similar lines to Mark and need much the same details to be confirmed:
  1. Do both the Bride and Groom individual records always have a matching Marriage1 event?
  2. Do they both always have both the Bride and Groom Fact Witnesses?
I also wonder why you need a separate Marriage Registration fact as the Marriage ceremony and registration happen at the same time in the UK, except in some rare cases. Although, I believe there may be some very recent changes in the pipeline that may change that.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5465
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by ColeValleyGirl »

tatewise wrote: 03 Jul 2022 10:46 I also wonder why you need a separate Marriage Registration fact as the Marriage ceremony and registration happen at the same time in the UK, except in some rare cases. Although, I believe there may be some very recent changes in the pipeline that may change that.
I see no suggestion that the marriages are all in the UK...
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by tatewise »

Helen, the screenshots in the groups.io posting are UK 1921 and the peoples' names all look British.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
phillip_leslie
Gold
Posts: 21
Joined: 30 Jun 2022 07:49
Family Historian: V7
Location: Huddersfield, West Yorkshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by phillip_leslie »

Hi Mark,

If I can find a marriage-registration record for a couple I will always record this as a separate fact to the marriage. This allows me to record both pieces of information and use the marriage registration data to validate the information that I have found or have been given for the marriage. I check the marriage date is appropriate for the marriage-registration quarter, and verify the marriage address with the registry-office town the marriage was registered at. I treat the marriage details for some people after 1837 as suspect until I can find a marriage-registration and record that information. Some couples will have a marriage record and no registration, and some with just a registration, and some with neither.

There are no other witnesses to the marriage-registration other than a Groom & Bride.

Your assumption on creating the new record is correct: I want to create a new family marr-reg record for all individual marriage1 records. Use the Groom to populate principal and Bride for principal-2 (or use the married1 principal as the marr-reg principal, which I appreciate that in FH it is now duplicated information) and copy across the citation information.

Kind Regards

Phillip
Marriage-Registration.jpg
Marriage-Registration.jpg (329.54 KiB) Viewed 2023 times
User avatar
ColeValleyGirl
Megastar
Posts: 5465
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by ColeValleyGirl »

tatewise wrote: 03 Jul 2022 11:17 Helen, the screenshots in the groups.io posting are UK 1921 and the peoples' names all look British.
i.e. some are in the UK.

What are your criteria for 'British' names? Smith? Jones? Patel? Garvalenski? All the names of British people I played with at school.

P.S. Yes, I'm being pedantic but your assumption is only an assumption based on incomplete data.
User avatar
Mark1834
Megastar
Posts: 2458
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by Mark1834 »

Works both ways - I’ve worked with colleagues all over the world with “English sounding” names (actual birth names, not just assumed “western” names).
Mark Draper
User avatar
Mark1834
Megastar
Posts: 2458
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by Mark1834 »

Ok, it’s unusual, but it’s not our place to tell you how to structure your data.

A plugin that creates the new fact and copies details from the groom/husband record is fairly straightforward. I’m happy to do a prototype for you this evening unless Mike already has already started on it. There’s no point in duplicating effort.
Mark Draper
User avatar
ColeValleyGirl
Megastar
Posts: 5465
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by ColeValleyGirl »

Mark1834 wrote: 03 Jul 2022 11:36 Works both ways - I’ve worked with colleagues all over the world with “English sounding” names (actual birth names, not just assumed “western” names).
Yep -- you can't tell anything about the location of a marriage from the names of the participants.
User avatar
Mark1834
Megastar
Posts: 2458
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by Mark1834 »

Another incidental question for Phillip looking at the screenshot. The Marr-Reg fact (and several others) appears to have a sort date defined (the ‘s’ in parentheses). Have you created that, or did it import that way? If the fact date is the GRO quarter, it may be superfluous (a similar issue was discussed recently for RM imports, so it may be a “feature” of TMG imports as well).
Mark Draper
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by tatewise »

Mark, I'm happy for you to build the prototype.

Not sure why I got jumped on for mentioning potential data duplication as Mark mentioned it first with even less justification.
Mark1834 wrote: 03 Jul 2022 08:19 A more fundamental question as background - why do you create a separate Marriage Registration fact? Doesn't it just duplicate most of the details of the Marriage fact?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5465
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by ColeValleyGirl »

tatewise wrote: 03 Jul 2022 12:41
Not sure why I got jumped on for mentioning potential data duplication as Mark mentioned it first with even less justification.
I queried your assumption that all the marriages were in the UK (an assumption Mark didn't make). I didn't say anything about data duplication.
User avatar
AdrianBruce
Megastar
Posts: 2090
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by AdrianBruce »

Just fyi so anyone can make any decisions for themselves:

In Scotland, registration of marriages started in January 1855. It was a separate step that took place after the marriage ceremony itself - a matter of days after, so far as I can see from my examples. For a long time, the marriage ceremonies took place in a domestic setting - marriage was altogether too frivolous a thing to take place in church, especially as there might be dancing and drink taken ;)

In England & Wales, registration of marriages started in July 1837. The registration is an integral part of the ceremony whether it's in a registry office (a civil ceremony) or a church / chapel / other place. At some point in the not too distant future, registration in England & Wales will be done, sort of Scotland style I'd guess, after the ceremony (in order to record the mothers' names without the expense of printing new blank books).

It is therefore, legally impossible for there to be a marriage ceremony in England & Wales (so far) without a registration. One might not be able to find the registration, but that's a different matter.

The one possible issue with this description for England & Wales is that pre-1837 it was by no means unknown to find a couple having a ceremony in an Anglican church and, separately, in a Roman Catholic church, as only the Anglican ceremony was recognised by the State. I don't know if that carried forward past 1837 - more usually, I think, a Registrar attended the RC ceremony so that they could do the legal bit. Note also that couples might have a blessing in a church after a civil marriage ceremony (e.g. Prince Charles and Camilla) but the blessing is not a marriage ceremony, it's a blessing. How you choose to record that is up to you, though.

Ireland appears to follow the practice of England & Wales in having a combined ceremony and registration, but bear in mind that non-Catholic marriages were registered from April 1845, while Catholic marriages were religious only, with no registration, until January 1864.

Isle of Man and Channel Islands I can't comment on.
Adrian
User avatar
ColeValleyGirl
Megastar
Posts: 5465
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by ColeValleyGirl »

Channel Islands: I *think* registration had to happen immediately after the ceremony.
Isle of Man: A can of worms, Including retrospective registration of dissenter marriages -- even decades later.
User avatar
phillip_leslie
Gold
Posts: 21
Joined: 30 Jun 2022 07:49
Family Historian: V7
Location: Huddersfield, West Yorkshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by phillip_leslie »

Hi all,

Lots of good questions and comments that I had not appreciated, especially that there is only 1 Marriage Registration record in my database per marriage, which is attached to the Principal (i.e. Groom). The bride is referenced as a witness (yes I know the groom is also a witness but that is a duplication introduced by FH in the data conversion). Dates I enter are defined in FH as Quarter Dates eg. Q1-1933 as this is how they are recorded by the registration agencies. Not all names are British, as some of my family are German & Norwegian, but married in the UK, but nearly all of the marriage registration records are from the GRO index.

FH fields that never contain any data are : Address, Note, Age.
I do have fact media, all of these are external to FH and stored on my C: drive and referenced as external files.

I'll try to summarise the specification of what I think I need using pseudo technical terms that I am becoming familiar with:

Select all Marriage1 records:

Create a new Marr-Reg record.
Assign marr-reg.principal = Marriage1.principal
marr-reg.principal2 = Marriage1.witness(role=Bride)
marr-reg.place = Marriage1.place (e.g. ,, Sculcoates, Kingston upon Hull, East Riding of Yorkshire, England)
marr-reg.date = Marriage1.date (e.g. Q1-1933
marr.reg.sdate = Marriage1.sdate (Sort Date eg. 13 January 1933).

Copy marr.reg.citation to Marriage1.citation (Sorry for my simplicity on this)

Copy marr.reg.media to Marriage1.media (Sorry for my simplicity on this also)
marr.reg.media.title = Marriage1.media.title
marr.reg.keywords = "Picture"
marr.reg.media.format = "jpeg"
marr.reg.media.fact.obje>File to Marriage1.fact.obje>File (e.g. C:\Users\phill\OneDrive\Documents\Genealogy\People\Family - Leslie\0001 Phillip Andrew Leslie\1933-01-00 Marriage Reg.jpg)

Delete marr.reg.citation (It may be you can re-index this to the new record and therefore it does not need deleting)
Delete Marr.reg.media (Same as above for citation)
Delete Marriage1 record.

end.


Apologies if my tech is way off and incorrect!

Regards

Phillip
User avatar
Mark1834
Megastar
Posts: 2458
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by Mark1834 »

Not bad, but this would be my recommended approach:

For each Family Record in the project:
  • If Husband and Wife both have matching Marriage1 facts (same date and place) and each is a witness to the other then
    • Create a new Marr-Reg fact for the family and copy all details from the Husband Marriage1 to the family Marr-Reg, apart from witnesses.
    • Delete the two individual Marriage1 facts.
  • Flag a potential error if matching facts cannot be located.
I will need to allow for the fact that either party could have multiple marriages, but I will assume that there are no multiple film-star style marriages between the same two individuals.

I'll code it up with lots of descriptive comments so you can follow the logic if you plan to dip your toe into the plugins water sometime later... ;)
Mark Draper
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by tatewise »

Mark, I think your first test "If Husband and Wife both have matching Marriage1 facts" will always fail.
I asked:
  1. Do both the Bride and Groom individual records always have a matching Marriage1 event? Answer seems to be NO.
    i.e. Phillip says "there is only 1 Marriage Registration record in my database per marriage, which is attached to the Principal (i.e. Groom)".
  2. Do they both always have both the Bride and Groom Fact Witnesses? Answer seems to be YES.
Phillip, what would help is a snippet of the GEDCOM for the Marriage1 event for the Groom.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2458
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by Mark1834 »

Leave it to me folks - it's difficult to work with two advisers! I think I know what Phillip wants, so I'll post a first draft based on that. If it doesn't do what he expects, we can take it from there...
Mark Draper
User avatar
David2416
Superstar
Posts: 398
Joined: 12 Nov 2017 16:37
Family Historian: V7
Location: Suffolk UK

Re: Convert a FACT from Individual record type to family record type.

Post by David2416 »

Bear in mind that that in the UK the GRO Indexes are produced from the registration supplied via a Local Registration office. There are a separate entries on the indexes for the groom and the bride. If either party had 'as known as' entries on the marriage certificate then there may be multiple entries in the index for that couple. The entries for the groom and bride and linked only by the year, quarter, place, volume and page. The place is a registration district only and not the place of marriage.
User avatar
phillip_leslie
Gold
Posts: 21
Joined: 30 Jun 2022 07:49
Family Historian: V7
Location: Huddersfield, West Yorkshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by phillip_leslie »

Hi Mark,

I appreciate your assistance and it would be fantastic to review your code. I'd appreciate that a lot.

Regards

Phillip
User avatar
AdrianBruce
Megastar
Posts: 2090
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by AdrianBruce »

ColeValleyGirl wrote: 03 Jul 2022 16:01 Channel Islands: I *think* registration had to happen immediately after the ceremony.
Isle of Man: A can of worms, Including retrospective registration of dissenter marriages -- even decades later.
Thanks - I have data about both the Channel Isles and IoM, however the Channel Isles pages contradict themselves about Sark, while there is apparently a huge hole in the Alderney records. The IoM data did mention that initial registration was for Dissenters only. I therefore decided that discretion was the better part of valour - perhaps fortunately since I'd not seen a mention about retrospective registration!
Adrian
User avatar
Mark1834
Megastar
Posts: 2458
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by Mark1834 »

I've re-read the entire thread, and tweaked the methodology to process individual registration records set up asymmetrically, with just one record per marriage recorded against the husband with the wife as a witness role of "Bride" (taking Mike's last point).

Please test the attached prototype on a copy of your database. Does it do what you expected?

The basic methodology is to loop through families, and for the husband identify all of their marriage registration events. If the registration witness is the same person as the family wife, we have the correct fact, and all the sub-fields of that fact are copied to a new family fact. The redundant individual facts are copied to a waste bin, which is emptied at the end of the plugin run to delete the redundant events (which automatically deletes their witnesses as well).

The trickiest part of the code for new users is the two stage process required to identify linked records, such as family->wife/husband or registration->witness. Stage 1 is to create a temporary pointer that defines the actual link, and stage 2 is to identify the record that the link refers to.
Attachments
Marriage Registration (0.1).fh_lua
(2.51 KiB) Downloaded 32 times
Mark Draper
User avatar
phillip_leslie
Gold
Posts: 21
Joined: 30 Jun 2022 07:49
Family Historian: V7
Location: Huddersfield, West Yorkshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by phillip_leslie »

Hi Mark,

That is excellent, just what I wanted and worked first time. Many Thanks. It did not convert a hand full of records as they did not meet your validation criteria as my data was incorrect. I'll fix them manually.

Your code is fascinating to read, beautifully laid out and documented.

Many thanks again.

Phillip
User avatar
Mark1834
Megastar
Posts: 2458
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by Mark1834 »

You're welcome Phillip. I think it is very important that plugins like this are clear and easy to understand, in order that new and improving authors can follow the logic.

You didn't pick up my question earlier on sort dates. There is an issue with RM imports retaining unnecessary sort dates, so it would be interesting to see if TMG does the same.

Would you mind downloading and running the first two options from this plugin from a recent thread when you have a moment please? It's set up as an RM audit, but the first two options are generic and apply to all projects. Best to do it on your copy again, but if you only select the list options rather than update, it doesn't make any changes to your records.

Does it report anything? The issue with RM is that date ranges have a sort date set to the start of the range. This is unnecessary, as FH sorts on the first date anyway, and creates inconsistencies with how the facts are displayed in the Property Box.

It would help if you could also post a copy of your TMG Import.fhf Fact Set file (in the project folder under Fact Types) please, so I can check whether it has the same inconsistencies that affect the RM equivalent.
Mark Draper
Post Reply