Fact Inclusion Controls #facttypes #events #gedcom #reports

RMtrix_tiny_check.png
If a user has set certain Fact Types to be excluded from GEDCOM export, those fact types are also not transferred to another database via Drag and Drop (DnD). This setting is controlled in the Edit Fact Type window, accessible through the menu path Lists > Fact Type List which opens the Fact Types window through which one can inspect the settings one fact at a time. The Edit button opens the Edit Fact Type window on the selected fact. To ensure that all facts or events for the selected persons are transferred via DnD, one needs to remember to inspect and change the ‘excluded’ facts to ‘included’; following the DnD, the settings wanted for GEDCOM, if different from those for DnD, must be restored. Given the one-at-a-time procedure, it is desirable to have more expeditious ways to change settings. This page offers some short queries that will satisfy some needs until such time as RootsMagic gains more efficient controls. These queries are included in RMtrix.

List Include Settings

This query puts the Include settings for all fact types in table form on one screen for easy inspection. Sorting the list on any column rapidly shows which fact types have been included or excluded from RootsMagic outputs.

FactTypeIncludeSettings.PNG
Screenshot from SQLiteSpy. 1 = included, 0 = excluded.

 

-- List FactType Include Settings
SELECT
 Name,
 Flags & 1 AS GEDCOM,
 Flags & 2 <> 0 AS WEB,
 Flags & 4 <> 0 AS FGS,
 Flags & 8 <> 0 AS NARR,
 Flags & 16 <> 0 AS INDIV,
 Flags & 32 <> 0 AS LISTS
FROM FactTypeTable
ORDER BY Name
;

N.B.: As written, the above query (and some of the others) requires SQLiteSpy to have the fake RMNOCASE collation as described at RMNOCASE – faking it in SQLiteSpy.

Save Current Fact Type Settings for Later Restoration

It would be nice to be able to save the current settings, make changes that are temporary, and restore them later. This query simply makes a copy of the FactTypeTable and saves it in the database file. Dead simple and does not affect RootsMagic operations.

-- Save current FactType settings for subsequent restoration
DROP TABLE IF EXISTS zFactTypeTable;
CREATE TABLE IF NOT EXISTS zFactTypeTable
AS SELECT * FROM FactTypeTable;

Set All Fact Types to be Included in GEDCOM and Drag and Drop

This query changes only the GEDCOM include setting so that all fact types are included in both Export and DnD. Similar UPDATE queries could be done for other include settings.

-- Set all FactTypes to be included in GEDCOM and Drag and Drop
UPDATE FactTypeTable
 SET Flags = Flags +1
WHERE NOT Flags & 1
;

Restore Saved Fact Type Settings

Regardless of what changes have been made or how they were made, this query returns the FactTypeTable to the way it was when its then current settings were saved to a backup table.

-- Restore saved FactTypeTable settings
INSERT OR REPLACE INTO FactTypeTable
SELECT * FROM zFactTypeTable;

Other Ideas

  1. Some may want to have more than one set of saved settings and be able to name or describe each set. That is possible; it would require another custom table and the addition of a SettingID column to the table that stores the multiple sets, or a different table for each set.
  2. Direct interaction with the settings from a tabular screen – possible using a high level programming language

 

Discussions & comments from Wikispaces site


Geraniums

Having problems

Geraniums
17 March 2012 21:40:50

I opened a database in SQLiteSpy.
I pasted this into the program:

— List FactType Include Settings
SELECT
Name,
Flags & 1 AS GEDCOM,
Flags & 2 <> 0 AS WEB,
Flags & 4 <> 0 AS FGS,
Flags & 8 <> 0 AS NARR,
Flags & 16 <> 0 AS INDIV,
Flags & 32 <> 0 AS LISTS
FROM FactTypeTable
ORDER BY Name
;

Then F9.
Error: no such collation sequence: RMNOCASE.

I get the same message when pasting this:
— Save current FactType settings for subsequent restoration
DROP TABLE IF EXISTS zFactTypeTable;
CREATE TABLE IF NOT EXISTS zFactTypeTable
AS SELECT * FROM FactTypeTable;

However, I was able to paste and run this:
— Set all FactTypes to be included in GEDCOM and Drag and Drop
UPDATE FactTypeTable
SET Flags = Flags +1
WHERE NOT Flags & 1
;

But then I couldn’t go back to the old setting because that command didn’t work.


Geraniums

Geraniums
17 March 2012 21:42:57

Now on to the next problem. After being able to change all the Fact Types to YES by running the command, after Dragging and Dropping into a new database, the properties numbers don’t equal.

In the new database, the numbers are lower in some cases, one being the Place List.

Leave a Reply

Your email address will not be published. Required fields are marked *