Request for merge facility for Fact Types

I find I have duplicated several fact types (baptism x2, Burial & Buried, 3 different Draft/Draft Registration, Immigration x3 …). Not sure how unless it came during misaligned migration from previous software or related to taking data to and fro with Ancestry TreeShare?

Anyway, the question is how to deduplicate the fact types now the new system inspires one to tidy up the data and the menus make it easier to see and access the faults in one’s data collection.

So far I renamed for instance the duplicate baptism (the one without a sentence constructed) as baptism2 and searched:

(Left Side-Bar Search/Person Search Advanced/baptism2/exists/true/click on person/Go To)

for all profiles using that baptism2. Hence I opened each person and changed that baptism2 Fact type (top right, popup menu) to the original baptism, which has the sentence constructed. There were only a handful. But I fear there might be more for other duplicated fact types.

So the option to right-click merge for Fact Types as with Places would be great please.

3 Likes

I think that some time ago (couple years?) I “merged” fact types by changing all of them to be IDENTICAL, then doing a GEDCOM export. It worked, but was a bunch of work, and I( also worry about the occasional loss of data in a GEDCOM trip…

I have merged fact types with SQLite. If you are able to use SQLIte, it’s a very easy thing to do as compared to many of the other things you might wish to change with SQLite. But it obviously requires SQLite programming skills and is therefore inaccessible to most users.

SQLite queries that are only reports are 100% safe. SQLite queries that change things are not 100% safe and they can easily corrupt your RM database. Because it is so simple, an SQLite query to merge fact types is quite safe even though it is changing things. There are really only two things to worry about.

One thing to worry about is to be sure that you are changing the correct fact type to the correct other fact type. You are not actually merging anything. You would need to delete the second fact type yourself from the RM user interface after your SQLite query has run.

The other thing to worry about is to be sure that the two fact types you are “merging” are set up exactly the same with sentences, roles, where the facts can be used, etc.

I very much support the idea of being able to do the merge of fact types from within the RM user interface. It should be a very easy thing to program. The user shouldn’t have to use SQLite. And the user shouldn’t have to export the database to GEDCOM, edit the GEDCOM, and re-import the GEDCOM into another database. In fact, using GEDCOM also runs a risk of data corruption. A GEDCOM export/import cycle that is to and from RM can lose data.

4 Likes

Completely agree with TheJerry. I had a similar situation just days ago (I’m a new RM user) where I had thousands facts that were using custom fact types, but were duplicates of the standard ones: Birth, Marriage, Death, Burial, etc. I haven’t touched SQL in a decade, but was able to get quickly up to speed and merge thousands of events/facts back into their standard ones…within minutes.

Each duplicate can be merged with two simple lines of SQL (repeat for each duplicate type, such as Birth (std) - Birth (custom):

UPDATE sometable SET EventType = 1 WHERE EventType = 1798 ;
DELETE FROM someothertable WHERE FactTypeID = 1798 ;

Custom events have FactTypeID > 1000, and the standard RM ones < 1000. So this example takes a custom fact 1798 and turns it into the standard event 1, then after that, removes the custom fact type from the list of available fact types.

That being said, DO NOT do this unless you are 100% comfortable with your abilities, AND made a database back up before starting. The above is just an example and is not intended to be used as-is. In fact, I’ve changed it slightly so that it’s not usable as-is, so you don’t get yourself into trouble. If you learn enough about SQL and the RM database, you’ll know what to change and how.

Just in case you, or someone else reading this, feels comfortable with doing/learning this, I’ve given you a head start.

2 Likes

Welcome to
sqlitetoolsforrootsmagic.com
Leverage your rusty SQL with 100’s of scripts for RM and info on the database structure and definitions. We have a discussion forum there, also, for SQLite users to trade code without bothering the masses.

1 Like

For people not familiar with the sqlite operation, don’t you think this is a feature request worth considering for implementation in a future update?

1 Like

IF you have updated to RM 9, you have the ability to change all people from one fact ( customized Birth) to another fact ( Birth)-- THE INTRO video to NEW TOOLS is here

starts abt 8:01-- now sure if there is a more defined video but basically all you do is go to tools on the left side of RM 9-- under Facts Tools , click on Change fact for everyone—click on fact type that you want to get rid of in first box (drop down menu)-- then in 2nd box click on fact you want it changed to-- hit run selected tool and you should be good to go—

JUST MAKE SURE YOU BACK UP YOUR DATABASE BEFORE doing this!!!

PS-- you might want to run a Fact list for everyone who has the fact you want to delete-- , save a copy to your desktop-- make the modifications-- then check those people to make sure it turned out okay-- then delete the old fact…

2 Likes

One additional final check as you delete the now unused fact type is as follows. RM will give you a warning message as you deleting a fact type. You basically just say yes if you are sure. If it’s a fact type that still in use, you will get an additional warning that the fact type is still in use. If you get that warning, then don’t say yes. Instead, investigate why it’s still in use. When you changed all the occurrences of the fact type to a different fact type, then the old fact type should no longer be in use.

1 Like

Thank Jerry-- I had never encountered that problem–so I appreciate the added info