Jump to content


Photo

Change fact type globally after import from Legacy

import legacy

  • Please log in to reply
8 replies to this topic

#1 royviggo

royviggo

    New Member

  • Members
  • Pip
  • 2 posts

Posted 05 October 2013 - 06:42 AM

Hi, I'm a new RootsMagic user, and I imported a tree from Legacy. Got my custom fact types in Legacy as new fact types in RootsMagic, and thats nice. But some of them already exists as fact types in RootsMagic, so I wonder if there is a way to change fact type globally? I can change fact type on one fact at a time, but it will be very boring to change about 500 facts for 2500 persons...
I can edit the new fact types, but I think it's silly to have two Residence facts, so I want to change them if possible. Any tips?

#2 slimjim

slimjim

    Member

  • Members
  • PipPip
  • 26 posts

Posted 05 October 2013 - 08:00 AM

I know no way to make global changes but I have an idea why the problem has arisen since I have a similar situation. If you examine the two apparently identical fact type definitions carefully you may find that one of them is a personal type and the other is a family type. In Legacy this distinction seems to be contained in where you report the event - as a personal event or a marriage event. In my case I used the Alt. Marriage event for two essentially separate reasons. 1. to report a discrepancy in the date of a marriage, in which case I recorded it as a marriage event, 2. to report a marriage to a possibly different person in which case I reported it as a personal event. RootsMagic sees these as two separate Atl. Marriage facts (which they are) and so I end up with two apparently identical fact types. Simply renaming the family type with (family) after the name makes it clear which one you are dealing with.

#3 Laura

Laura

    Advanced Member

  • Members
  • PipPipPip
  • 4276 posts

Posted 05 October 2013 - 08:23 AM

We cannot rename a program default fact name. We can rename a user defined fact name.

I also put (family) after the user defined fact name. I put a character at the beginning of a user defined fact name so all the user defined facts sort together at the beginning of the fact list.

#4 slimjim

slimjim

    Member

  • Members
  • PipPip
  • 26 posts

Posted 05 October 2013 - 09:49 AM

Having never started a RM data base from scratch, always from a GEDCOM import, I was not aware of which facts were built-in and which user-defined. It turns out that Alt. Marriage is user-defined and as such a poor example.

In fact Legacy has a much looser approach to event or fact definitions with virtually all event definitions editable but at the same time a much stricter approach to the small number of events which logically can only happen once. These ones are being only available from the basic individual input screens and marriage input screens and cannot be added in any other screen. This prevents you from inserting more than one such event (say a birth) and introduces the necessity of an Alt. Birth. event if you have doubtful information to record. RM on the other hand allows you to have more than one birth event for an individual. Unfortunately when importing from Legacy, RM which does a great job, does add all the facts without distinguishing which ones are user- or Legacy- designed.

#5 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6173 posts

Posted 05 October 2013 - 12:51 PM

One can answer the question of user-defined vs built-in fact types using a SQLite tool to inspect the RootsMagic database directly. Those in the FactTypeTable with FactTypeID > 999 are custom. One can also manipulate the database directly and globally change all of one Fact type to another Fact type, simply by replacing in the EventTable all EventType values matching one FactTypeId to the other. For more, follow the link in my signature.

Tom user of RM7550 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> RMtrix-tiny.png app, a bundle of RootsMagic utilities.


#6 Alfred

Alfred

    Advanced Member

  • Members
  • PipPipPip
  • 5734 posts

Posted 05 October 2013 - 12:54 PM

You can go to the file menu and select NEW to create a new, empty database which will have only the RootsMagic built in fact types listed when you select the LISTS menu then Fact type list.

You can compare that with the list of your imported database to see which art user defined.
(You can use the Windows Snipping Tool to copy the lists as graphics to something like Windows Paint for side by side comparison.)

Now, if there are user defined facts which duplicate a built in fact or other user defined ones, you can edit the user defined one's Abbreviation to match it's duplicate.
Once you get all of them edited you can drag and drop your entire database into an empty one of a new name and the duplicates should be combined.

I would keep the original for a while so you can compare them to see if things are OK.

----------------------------------
I don't think this will work between types, personal and family, they would both have to be the same type.
Alfred

#7 Vyger

Vyger

    Advanced Member

  • Members
  • PipPipPip
  • 3385 posts

Posted 06 October 2013 - 06:14 AM

I would use the SQLliteSpy option and do regulariliy as I try as far as possible to keep within the Rootsmagic standard set of facts. I do this to maintain some compatibility with the recognised standard and often import gedcoms from other users with multiple custom facts. A simple explanation of how to achieve this global change appears later in this post.

Personally I would go to Tom's page below and download SQLiteSpy, remember to follow the link to "fake collation" and follow his instructions.

http://sqlitetoolsfo.../SQLiteManagers

For a novice with no database knowledge this can look very complicated but a lot can be achieved with very basic single table changes which this question asks/requests, so do read on.

I would first make a copy of your database by finding it in Windows Explorer, Copy it and Paste it which will give you an exact copy, rename this copy as something so you will easily recognize it as your test database and try SQLiteSpy on that database first. Even when sure what you are now about to do on your working database always back it up before running any queries on it.

Once you have opened your Rootsmagic database with SQLiteSpy remembering to change the "SQLite3 Database" file option to "Any File" you will see all the tables in the database to the left.

Double Click on FactTypeTable and you will see a list of all Fact Types (one per row) and each identified by a unique number FactTypeID. As TomH said anything greater than 999 is a user defined fact.

Now Double Click on EventTable, Don't look at it in too much detail but the EventType number corresponds to the FactTypeID in the FactTypeTable, in other words they are linked and this EventTable contains all your facts both Individual and Family.

Jump back to the FactTypeTable and examine your facts. For the purpose of explanation I will use an example where a FactTypeID #1016 is found called BORN, well we know that this is should probably be the Rootsmagic built in Birth Fact which is FactTypeID #1. So once we are happy that we want to globally make that change go back to the EventTable by double clicking on it and all we want to do is change all instances of EventType #1016 to EventType#1, really just a find and replace operation. Copy the simple code below into the pane at the top of SQLiteSpy and press F9. The bottom left info bar below the list of tables will now report the time it took to complete the operation and how many records were updated.

UPDATE EventTable	 -- The Table you are going to make changes to
SET EventType = 1	 -- The field name and the value you are going to SET it to
Where EventType = 1016  -- The case in which you are going to make that change
;

At this point open the database again with Rootsmagic, use File > Database Tools > Rebuild Indexes and check the changes you just made.

TomH would be very expert in these queries but everything in baby steps and I can understand how some of his more complex queries can appear a bit foreboding so a primary school beginners guide would certainly get more people into using SQL IMO. ;)

Edit : Hopefully nobody pasted the code snippet literally without changing the the SET EventType - Where EventType numbers to their own requirements. I was going to say hopefully it goes without saying but it's better to be said just in case :rolleyes: and remember to experiment first and always back up before applying any queries.

Edited by Vyger, 07 October 2013 - 03:25 AM.

“Your most unhappy customers are your greatest source of learning.” -Bill Gates

It's now time for discretion, trust, patience and support

 

User of Rootsmagic 7.5.9, Family Historian 6.2.7, Family Tree Maker 2014 & Legacy 7.5

 

Excel to Gedcom conversion - simple getting started tutorials here

 

Root


#8 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6173 posts

Posted 06 October 2013 - 09:18 PM

Very well written, vyger. I shall link to your message from the wiki as a good example for beginners.

Tom user of RM7550 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> RMtrix-tiny.png app, a bundle of RootsMagic utilities.


#9 royviggo

royviggo

    New Member

  • Members
  • Pip
  • 2 posts

Posted 09 October 2013 - 02:39 AM

Thank you all for the response!
TomH was right on with link to all the database goodies, and a very good explanation Vyger :)
I am a developer, so I'm going to explore these utilities further, especially sharable events :rolleyes:
Alfred, that was a very simple and elegant solution, and it worked, except that some tables was empty afterwards: ConfigTable, ExclusionTable, GroupTable and LabelTable. I don't think they are critical when you start using RM, but groups and labels are useful features you may not want to loose. This must be a bug (version 6.3.0.4).