RIN MRIN – add Reference Number fact to all persons #mrin #refno #rin

2024-08-06 updated script for RM8-10 added

Migrants to RootsMagic from other genealogy software are often disappointed in the invisibility of the Marriage Record Identification Number or MRIN and may have a filing system based thereon. While the individual’s record number (RIN) may be preserved in certain imports either in the RootsMagic RIN or in a custom fact type, no such mapping is provided for MRIN. And should data be transferred from one RootsMagic database to another or to some other software, MRINs (and RINs, for that matter) may change. Therefore it is advisable that nothing needing to be permanent should be based on a potentially volatile number such as MRIN.

However, one could make a snapshot of the current RIN and MRIN and store it in a Reference Number fact which is transmitted reliably through GEDCOM to virtually all genealogy software. That is what this script does.

REFN-_MRIN.png
Reference Number fact containing the RIN and MRINs for a person added by REFN-MRIN.sql. Tools>File Options>General>”Number to display after name” set to “Reference Number (REFN)”.

The format of the Reference Number is designed so that searching through them for an MRIN or a RIN can produce unambiguous results with the “contains” operator. The RIN search term is “Rnn ” – the leading “R” and trailing space character delimit the RIN so that matches are not found among the MRINs or in other RINs that have the same “nn” sequence of digits somewhere in them, e.g., the search term “17” could match within R9175 or within “817M”.

Likewise, to search for a MRIN, the search term should be in the form ” nnM”. In this case, a leading space character and trailing “M” disambiguate search results.

At the time of the above screenshot, the script did not create Reference Number facts for persons with no children nor spouse, i.e., not in the FamilyTable and thus having no FamilyID or MRIN. The script now produces the REFN fact for them in the same format with “0M” to signify the lack of a MRIN. Note that I have assumed that MRIN and FamilyID are synonymous; no Marriage fact is required for there to be a FamilyID – the latter are created whenever a couple is paired or a person is linked to another as a parent which necessitates a couple, even if one partner is unidentified.

For each Ref# fact created, the script also does this:

  1. Sets fact private so it can be suppressed in tabular reports and exports.
  2. Sets fact primary so it is the Reference Number displayed after the name when there are other such facts; however, if another such fact is marked primary and was added earlier, it takes precedent.
  3. Sets SortDate so that the fact appears at the top of the list in the Edit Person screen.
  4. Sets the EditDate to system time but this has no effect on the “Date last edited” optionally displayed in People View. It may be of use to the power SQLite user in looking for exceptions by inspecting the EventTable.
  5. Customises the local sentence to output nothing in narrative reports.

Requires the REGEXP and GROUP_CONCAT() functions which are available in SQLiteSpy 1.9.10, on which the script was developed.

REFN-MRIN.sql version for RM7 and earlier

REFN-MRIN-RM10 version for RM8 and later #rm9 #rm10

An earlier script took a different approach, adding each MRIN as a custom fact to each person so that a person with two spouses would receive a corresponding number of these facts. This may be advantageous for some things. See Facts – Add custom MRIN event to each person.

Reports – New Paragraph for General Note #paragraphing #reports

RootsMagic 6.3.1.0 introduced in 2014 some very nice options for control of paragraphing of narrative reports after we had developed a number of scripts in 2011ff described in Paragraphing. There remain some issues for some people as of RM 7.2.1.0. One was recently expressed by Wiki member aefgen:

Now another problem that I see has been discussed before: the last fact to print for a person in the narrative report is followed immediately by the general note for that person, even when you choose to have a space between each fact. That last fact (which will vary depending on what other facts are included in the database for that person) runs on into the text for the note.

Reports-_New_Paragraph_General_Note.sql-_Narr_Report_Be.png
Snippet from a narrative report showing the General (or Personal) note running on in the same paragraph as the last individual event.

Here is a script that works around this limitation by pre-pending to the General Note two pairs of CR/LF control codes to force a new paragraph. It applies the codes only to non-empty notes.

Reports-_New_Paragraph_General_Note.sql-_Narr_Report_Af.png
Same report as above after running the script.
Reports-_New_Paragraph_General_Note.sql-_Note_Editor.png
The modified General Note as viewed in the RootsMagic Note Editor.

When executed on a database, the script creates two temporary views that persist as long as the SQLite manager keeps the database open:

  • vBareNote: the non-empty General Note stripped of one or two pairs of leading CR/LF in readable text,
  • vNewNote: the Note from vBareNote pre-pended with two CR/LFs in readable text, which has been applied to the database Note field in PersonTable.
Reports-_New_Paragraph_General_Note.sql-v_Bare_Note.png
vBareNote should always show the first line of text from the General Note with no leading blank lines, else there is an issue.


Reports-_New_Paragraph_General_Note.sql-v_New_Note.png
vNewNote should always show two empty lines before the text, else there is an issue.

The Note field in PersonTable is typed by RootsMagic to be BLOB (Binary Large OBject) so the script CASTs the readable text accordingly. That said, RootsMagic does not appear to preserve the type for this field converting it to Text when you next Save from the Note Editor. This change in type may be a useful indicator of edits done in RM after the last time this script was run.

Reports-_New_Paragraph_General_Note.sql-_Person_Table.png
After running the script, all the non-empty Note fields in PersonTable should be of type “BLOB” with two pairs of leading hex characters “0D 0A”, the ASCII control codes for CR/LF.

If a vBareNote cell does not display the first words of the Note, there is a problem with the original Note in PersonTable that requires manual attention either through RootsMagic (the vBareNote.PersonID is the RootsMagic RIN or Record Number) or through the SQLite manager. Re-executing the script after such manual edits will assure that the PersonTable.Note fields consistently have two leading CR/LFs.

Reports-NewParagraphGeneralNote.sql

Language other than English #languages #reports #french

Background

RootsMagic Inc promised non-English language versions would be forthcoming when RootsMagic 4 was released in 2008. RootsMagic 4 was built on a database that supports Unicode and data can be stored in most languages. RoostMagic would seek volunteers to help translate the user interface and report strings into their languages. Nothing has ever come of that promise and users continue to seek ways in which they may be able to, at least, produce reports that are in another language.

An Attempt

This page provides the means to change what you can in RootsMagic 7 into another language and demonstrates its limitations. French is the example used because the author knows it a little bit.

Ind_Summ_Delilah_Woods-_Franglais.png
Individual Summary report with French fact names. However, highlighted words are hard-coded and cannot be changed.

The Individual Summary Report has the fewest elements that are hard-coded in English, of any of the popular text reports. The Narrative reports have the most. The page above has highlighted examples of the hard-coded English text which the user cannot change.

The report does show French fact names (maybe not the best translations but that is beside the point). The RootsMagic user interface in Lists > Fact Type List, allows the user to change the fact names and abbreviations for user-added fact types but not for the built-in fact types. However, it is possible to change the built-in fact types through SQLite as described below.

One could open the database with a SQLite manager and edit the FactTypeTable fields Name and Abbrev directly for all having a FactTypeID under 1000 – these are the built-in ones. Everyone above 999 is custom and can be edited through RootsMagic.

I took a different approach. I opened the FactTypeTable and copied from it to Excel, keeping just the columns FactTypeID (the key), Name and Abbrev. I added columns for the translated Names and Abbrevs and for formulas to create SQLite statements. I copied the Name column into Google Translate and its output into the translated Name column. Likewise for the Abbrevs. In Excel, I revised the translations as some were clearly wrong or poor (and maybe some still are). The spreadsheet could be used for any language.

Then I developed a SQLite script in Excel that I could copy out to the SQLite manager. The script creates a table with the English and translated fact type names and abbreviations and revises RootsMagic’s FactTypeTable accordingly. It does not touch the fact sentences which remain in English but that is something the user can do through RootsMagic.

Downloads

FrenchFactTypes.xlsx Edit this spreadsheet to create the following script for another language.
Facts-TranslateNames.sql Run this script as-is to convert your built-in fact types to French.

Export to a French (or other) Database

Because RootsMagic does not produce a complete non-English report even with the above translations, the only other option is to export the subjects of the desired report to another software that does. Below is an example of a report from Family Tree Builder 8.0, a free software from MyHeritage.com that can work in 40 or more languages. This is the first page of a Descendant report; it has no equivalent to the RootsMagic Individual Summary. While it is a major improvement linguistically, there are flaws due to the GEDCOM translations by both programs. And FTB outputs footnotes in its French report as blanks, not even the English originals; perhaps a bug in this new version that has undergone a major rewrite from version 7 as RootsMagic did between 3 and 4.

RM_GEDCOM_imported_to_FTB-_Desc_Report_French.png
Sample report from Family Tree Builder 8.0 from data imported from a GEDCOM exported by RootsMagic 7.

Group – Population statistic #namedgroup

rev 2023-02-20 added version for #RM8

Groups_Population.png
As executed and displayed in SQLiteSpy.

This small query returns a list of named groups with the total number of people in each group.

It also includes the GroupID number which may be useful for inspecting the GroupTable.

It creates a temporary View which is dropped when the SQLite manager closes the database.

It requires the RMNOCASE collation.

It is very fast. On a database of some 1200 people and 40 named groups, it takes around 8 milliseconds to the results in the screenshot. On a database of 160,000 and 3 groups, just 1/3 second.

Download

GroupsPopulation.sql for pre-RM8 versions

FTM to RootsMagic Migration #ftm2014 #gedcom

This page provides some guidance to émigrés from Family Tree Maker to most completely and successful migrate their data to RootsMagic. It includes some operations in FTM itself in preparation for exporting data, the export itself, operations on the GEDCOM file before importing into RM, and then operations in RootsMagic and with SQLite that complete the process. What is provided here is from the perspective of a light user of FTM who primarily was interested in its ability to batch download citation images along with the Ancestry Family Tree, acting as an intermediary between Ancestry.com and my RootsMagic database. The platforms on which this page is based are Family Tree Maker 2014 for Windows and RootsMagic 7.0.9.0 for Windows.

Cleanup in Family Tree Maker

Don’t rush to export your database without considering whether there are things you should do to clean it up first, because:
a) You want as complete an export as possible (not everything makes it to GEDCOM)
b) You want the export to be as compatible as it can be with RootsMagic (if RootsMagic does not recognize something in the GEDCOM file, it is not going anywhere)
c) There may be some normalisation of your data and styles more easily done in Family Tree Maker.

One reference offering guidance on cleanup is Ben Sayer’s blog article, Replacing Family Tree Maker, Part 1: How to Scrub Your Data, but I would offer a caution: his approach is to achieve highest compliance with the GEDCOM 5.5.1 draft specification, according to his interpretation. While RootsMagic supports the same specification, that does not mean that it has been interpreted consistently with his. There may be differences that warrant different cleanup operations or, in some cases, inaction. It also is based on Family Tree Maker 3 for the MacIntosh computer, not Family Tree Maker 2014 for Windows which is the basis for this page. I recommend that you read through each Part and comments to Part 3 as there are things he discovered with the import of his ‘spec-compliant GEDCOM’ that counter some of what he recommended in prior Parts, e.g., he advises against converting EVEN tags to FACT tags as he had recommended in Part 2.

Exporting from Family Tree Maker 2014

FTMExport_Dialog.png
FTM2014 Export setting

The common recommendation has been to export to GEDCOM 5.5, Destination: Other. However, that GEDCOM omits some things, notably Media Description, that are included if you change the Destination to Family Tree Maker 2012. Use the UTF-8 Character Set for support of most alphabets.

Edit the GEDCOM for better compatibility

Ben Sayer’s page Replacing Family Tree Maker, Part 2: How to Get Your Tree out of FTM provides useful guidance on tools and procedures for editing the GEDCOM file exported from FTM. However, there are changes he advocates for compliance with GEDCOM 5.5.1 that may be unnecessary or inappropriate for an import to RootsMagic 7.0.9.0. Read Part 3 before you undertake any of the revisions he recommends in Part 2. This is a work-in-progress that will expand with experience.

Import into RootsMagic

Ben’s page

Post-import Operations

Events with no Media attached #events #media

I am wanting a list of events that have no media attached. I am looking specifically for Residence/Census events that don’t have the Census Media attached. I may use this for birth certificates, death certificates, headstones, etc. Do you have a query for this? I have looked for one but it didn’t seem to be what I was looking for. I want the ownerid, given name, surname, the fact type, thee date, the details.


You could start from scratch or adapt from several scripts already developed. Here’s an example that starts with the Wayfinder Views in Search -wayfinding from data tables to RM screens. Download and execute the script RM7_5_WaymarksViews.sql from that page. We’ll use the EventWay view as a start as it takes care of looking up the name and RIN of the person or the couple if a family-type event.
Events-sans_media.png
Events-sans_media_(res&census).sql

Tom


As promised, here is my overly grandiose script to find missing stuff in my database, mostly missing sources and media. It’s fine tuned for my personal research needs, but it may provide some ideas.

Jerry
missing_stuff.sql

Color Code by Consanguinity Degree #colorcoding #relationships

I only recently recognised that the values that RootsMagic puts into the Relate1 and Relate2 fields of the PersonTable when the Set Relationships function is applied are more useful than merely codifying the relationship (e.g., see Relationships). Apart from special cases for Self and in-laws, the sum of the two values corresponds to the degree of consanguinity (see this Wikipedia article). For example, the degree of separation in consanguinity is the same from you to your g-g-grandparents (4) as it is to your 1st cousins and your great-aunts and -uncles and your grand-nephews and -nieces. It strikes me that the consanguinity degree might be an interesting, if not useful, basis for color coding. Indeed, it is so easily implemented, I wonder why it is not an option for the Color Code People tool or that consanguinity is not a criterion for finding people and creating groups.

Color_Code-by_Consanguinity_Pedigree.png
Example of color coding by consanguinity degree. Note that each generation of grandparents gets a different color, a difficult task in RootsMagic.

There are 14 color codes plus black in RootsMagic 7 thus supporting consanguinity degrees out to your 12th great grandparents and other relatives of equal degree. They are set in the Color field of PersonTable and range from 0 (black) to 14 (gray). It is a trivial script to assign the consanguinity degree directly to these color codes:

UPDATE PersonTable SET Color = MIN(Relate1 + Relate2, 14);

The MIN() function forces the highest available color code for all degrees beyond 14, which includes Self and In-Laws. These could be excluded by adding a constraint:

UPDATE PersonTable SET Color = MIN(Relate1 + Relate2, 14)
WHERE Relate1 < 999;

I have uploaded three scripts that assign the colors differently:

ColorCode-byConsanguinity1.sql Consanguinity degree mapped directly to RootsMagic color code values.
ColorCode-byConsanguinity2.sql Consanguinity degree mapped via lookup table to RootsMagic color code values so that the closest are brightest and farthest are darkest.
ColorCode-byConsanguinity3.sql Consanguinity degree mapped via lookup table to RootsMagic color code values so that the closest are darkest and farthest are brightest.

ColorCode-byConsanguinityColorTable2.PNG
Consanguinity color coding by script#.

I used a spreadsheet to sort the colors by brightness and hue and to generate the SQL INSERT statements that create the table to map the consanguinity degrees to color codes for versions 2 and 3.
Color_Code-by_Consanguinity_Color_Table.png
ColorCodeDistances.xlsx You could adapt this spreadsheet to color code consanguinity as you see fit and edit a script accordingly with the revised set of SQL statements.

Ancestry TreeShare – Impact #ancestrycom #TreeShare

Disconnect but preserve Ancestry Sources links for next Upload

Subsequent to this script being published 2017-07-21, RootsMagic 7.5 was updated so that its File Option > TreeShare > Disconnect from Ancestry Tree behaves the same way or similarly in that the links with Ancestry Sources are not deleted. RootsMagic 7 Update History is silent on when that happened.  The text below has been edited accordingly.

SUPERSEDED: TreeShare-DisconnectButNotCitations.sql 2017-07-21 rev to correctly handle erroneous connection to multiple Ancestry Trees.
This is an intriguing discovery that means one could make many changes on the RM side of TreeShare, disconnect with this script instead of TreeShare’s Disconnect, and then upload to a new tree. It has the labour saving effect that batch updating of changes would have, if it were available. TreeShare’s Disconnect no longer causes all linked sources seen on the AMT as “Ancestry Sources” to be converted to “Other Sources” in the next upload and hints are generated all over again for “Ancestry Sources”. This script’s partial disconnect precludes that from happening. So both one-by-one acceptance of changes and one by one clearing of redundant hints are avoided. The downside is that one should thus work on only one end at a time followed by the up or download. And media migration will be repeated over and over at the expense of network bandwidth quota, computer time and storage space. If the only media is that of “Ancestry Sources” on the AMT, then there is an option in TreeShare upload to exclude the media thus saving bandwidth in one direction.

LinkAncestryTable #RM7.5 renamed AncestryTable #RM8

While the RootsMagic 6 database structure has been preserved with the introduction of Ancestry TreeShare in RootsMagic 7.5, an Ancestry specific table has been added:

CREATE TABLE LinkAncestryTable (LinkID INTEGER PRIMARY KEY, extSystem INTEGER, LinkType INTEGER, rmID INTEGER, extID TEXT, Modified INTEGER, extVersion TEXT, extDate FLOAT, STATUS INTEGER, Note BLOB );
 
CREATE INDEX idxLinkAncestryExtId ON LinkAncestryTable (extID);
 
CREATE INDEX idxLinkAncestryRmId ON LinkAncestryTable (rmID);

For any modification made directly through SQLite to a database connected to an Ancestry Tree, TreeShare will not report that there has been a change unless the Modified field of the record in LinkAncestryTable corresponding to the modified person, event, citation, … has been set. Thanks to member alerum68 for flagging this issue.

Structure

LinkAncestryTable structure appears to be identical to that of LinkTable used with FamilySearchFamilyTree. While LinkTable anticipated connections with other online tree servers, RM Inc possibly chose to add a dedicated table for AMT TreeShare to simplify development and debugging or to allow interchange of RM 7.5 database files with prior versions down to RM6.

Field Usage

One download of an AFT indicates the usage of these key fields:
LinkType: 0 = PersonTable; 4 = CitationTable; 11 = MultiMediaTable
rmID: the record number or rowid of the linked table
extID: Ancestry’s key for access to its record used by RM according to LinkType…

IF LinkType = 0 THEN extID contains what I think is the unique key for the Ancestry Family Tree and Person and extVersion contains the Ancestry Universally Unique ID for the linked person in that tree
IF LinkType = 4 THEN extID contains the unique key to access the Ancestry source database record for the linked citation.
If LinkType = 11 THEN extID contains the unique key to access the Ancestry image file and MultiMediaTable.MediaFile = extID.extension (the media filename)

There may be more LinkTypes to be identified as this was a tree developed solely on Ancestry.

Temporary ADP File During TreeShare Download

I caught this because of an error message during a TreeShare download that could not complete. A temporary file of the name databasefilename.ADP was visible. While a binary file, some of the content is readable with a hex editor and contains a mix of SQLite statements and data about some people. Also while Windows associated the extension with Microsoft Access, it clearly has nothing to do with that program. Perhaps ADP stands for Ancestry Data|Download Procedure|Process|Progress. The ADP file is deleted on completion of the TreeShare download.

Transfer via Drag and Drop and Export

A drag’n’drop from a TreeShare database to a new database surprisingly preserved the Ancestry WebHints. The new database’s LinkAncestryTable was populated with LinkType=0 records for the persons transferred. The extID value was carried over but the extVersion value was blank. The extID value is also exported to the custom GEDCOM tag _AMTID which suggests that RM’s drag’n’drop transfer continues to rely solely on GEDCOM export/import in the background.

TreeShare connected to the same Ancestry Member Tree as the original (that, too, was a surprise) and executed a Compare Databases and reported no close matches nor any matches through the “Show All” link. However, the name list showed that the transferred people were paired with an AMT person; selecting them showed the green match for all facts but all citations were unmatched (pink). That follows from there having been no transfer of LinkAncestryTable records for any LinkType other than 0.

Citations for the Ancestry Name were now seen in the RM Person field whereas they disappeared from TreeShare on the downloaded database. It appears that the drag’n’drop moves these hidden citations from being Name citations to Person citations (see Citations Invisible Revealed for background).

LinkAncestryTable.extVersion field

Copying the extVersion value from the source database to the destination database had no apparent effect on the latter’s TreeShare results. It did not result in a reported match and had no effect on the sidelist icons – the RM icon remained pale green tree on gray background.

LinkAncestryTable.Modified field

Copying the Modified value from the source database to the destination database had no effect on the reported number of changes (0) but did invert and saturate the colours of the RM icon in the sidelist to white tree on darker green background.

From 2 TreeShare databases to 1

A drag’ndrop from a second TreeShare database connected to a different Ancestry Member Tree than the target database does not carry over any data from the source database LinkAncestryTable. Thus the Ancestry WebHints from the second database are unavailable to the target. The transferred persons are unmatched people that have to be manually Linked or Added to the Ancestry Tree to which the target database is connected. A fresh set of Ancestry Hints for these added people will eventually generate on the AMT and become available to the target database but will ignore any prior Accepts and Rejects in the source database. The ostensibly identical person is now in two different Ancestry Trees, effectively two unique persons in the Ancestry database.

Separate drag’n’drops of multiple sets of people from the same TreeShare database to a second database that has not had any such transfers from a different TreeShare database nor has been TreeShared with an Ancestry Family Tree other than the one connected to the source database do retain their links to the AMT people so their WebHints are immediately available.

Rename Downloaded Media Files

Because LinkAncestryTable contains the Ancestry key for its media file, one can rename a downloaded file from AncestryMediaKey.ext to something more meaningful without apparently affecting anything, provided that the MultiMediaTable itself has the new filename. The MultiMediaTable.filepath can also be changed if the file is moved without effect on TreeShare. This might suggest the possibility of some procedure renaming and reorganizing media files that have been downloaded through a TreeShare Tree download. See TreeShare – Rename Cryptic Filenames for Media

New Source Templates #RM7.5 #RM8

Two new Source Templates have been added in the RM7.5 update, for a total of 415 built-in templates (unchanged as of RM7.9.310):

  1. TemplateID 438: Ancestry Member Tree
  2. TemplateID 439: Ancestry Record

I’m not sure that the template for Ancestry Member Tree is complete because it lacks sentence templates for the Short Footnote and Bibliography. If it is used in a TreeShare download and if a user wishes to use the Short Footnote option or include cited Trees in the Bibliography of a report, they will not be included. The template cannot be edited so there is no user fix; a future RootsMagic update would be needed.

The template for Ancestry Record was used by all citations in a TreeShare download of an Ancestry Member Tree. It is identical to the Book, Basic format source template except it omits the [SubTitle] field. Thus it is very compatible with GEDCOM with a 1:1 relationship between its fields and the available standard GEDCOM fields. However, RootsMagic exports sources to just two standard GEDCOM fields, TITL and PAGE so there is potential distortion of footnotes when exported to other systems. A source downloaded through TreeShare, stored through the Ancestry Record template, and transferred to FamilySearch Family Tree will become a Free Form source when brought from FSFT into another RM database or back to the same database.

Script Revision

Because the only obvious database changes are the additions of the LinkAncestryTable and two more built-in source templates, prior scripts should function as they did before the update. However, those that modify or add records will not cause TreeShare to flag that a person’s RootsMagic records have changed. Differences between RM and the connected AMT are detected but there is no easy way to find them. It is desirable to set up SQLite triggers that detect a change to a table record and set the Modified flag for a person accordingly. Further investigation and development is needed.

The first script to be updated for RM 7.5 is to help a SQLite user see what the new table LinkAncestryTable relates to, just as it did for LinkTable used in conjunction with FamilySearch Family Tree. This revised Waymarks script is described on the page: Search – wayfinding from data tables to RM screens . RM7_5_WaymarksViews.sql

Correction of the Flawed Ancestry Record Source Template #RM7.5 #RM8

This template was added in RM7.5 to handle sources downloaded through TreeShare from Ancestry. Problems with the way it renders Footnotes and Bibliography for most of these sources were reported in the RootsMagic Forums discussion Plz correct configuration of Ancestry Record source template (lost or deleted before May 2019). It works fine for a conventional human name in the Author field but not for a blank name, a one-word name such as Ancestry.com nor an institutional name such as “The Church of Jesus Christ of Latter Day Saints”. There are unwanted commas or laughable reversed names.

Here’s a possible workaround using a SQLite query to modify the built-in Ancestry Record template. Yes, they can be edited through SQLite but the customisation is lost in a RootsMagic transfer.

Original sentences:
Tree_Share-_Ancestry_Record_Template_Original.png

Revised sentences:
Tree_Share-_Ancestry_Record_Template_Modified.png
SQLite statement:

UPDATE SourceTemplateTable
SET Footnote =      '<i>[Title]</i> (<[PubPlace]|N.p.>: <[Publisher]|n.p.>, <[PubDate]|n.d.>)<, [Page]>.'
   ,ShortFootnote = '<i>[Title:Abbrev]</i><, [Page]>.'
   ,Bibliography =  '<i>[Title]</i>. <[PubPlace]|N.p.>: <[Publisher]|n.p.>, <[PubDate]|n.d.>.'
WHERE TemplateID = 439 -- Ancestry Record template
;

I eliminated the [Author] field completely to avoid the problem of parsing it correctly or the extraneous comma in its absence. I don’t know if this will work okay for all possible sources that Ancestry may deliver through TreeShare with this template. If you want to keep {Author] at risk of the “Saints, …” issue, then:

UPDATE SourceTemplateTable -- keeps [Author] but clears extraneous comma
SET Footnote      = '<[Author], ><i>[Title]</i> (<[PubPlace]|N.p.>: <[Publisher]|n.p.>, <[PubDate]|n.d.>)<, [Page]>.'
   ,ShortFootnote = '<[Author:Surname], |[Author], ><i>[Title:Abbrev]</i><, [Page]>.'
   ,Bibliography  = '<?[Author:Surname]|[Author:Reverse]. |[Author]. ><i>[Title]</i>. <[PubPlace]|N.p.>: <[Publisher]|n.p.>, <[PubDate]|n.d.>.'
WHERE TemplateID = 439 -- Ancestry Record template
;

Discussions & comments from Wikispaces site


ve3meo

LinkAncestryTable

ve3meo
29 June 2017 16:51:50

LinkAncestryTable structure appears to be an extension of that of LinkTable used with FamilySearchFamilyTree. While LinkTable anticipated connections with other online tree servers, RM Inc possibly chose to add a dedicated table for AFT TreeShare to simplify development and debugging or to allow interchange of RM 7.5 database files with prior versions down to RM6.

One download of an AFT indicates the usage of these key fields:
LinkType: 0 = PersonTable; 4 = CitationTable; 11 = MultiMediaTable
rmID: the record number or rowid of the linked table
extID: Ancestry’s key for access to its record used by RM according to LinkType.
IF LinkType = 0 THEN extID contains what I think is the unique key for the Ancestry Family Tree and extVersion contains the Ancestry Universally Unique ID for the linked person in that tree
IF LinkType = 4 THEN extID contains the unique key to access the Ancestry source database record for the linked citation.
If LinkType = 11 THEN MultiMediaTable.MediaFile = extID.extension (the media filename)

There may be more LinkTypes to be identified as this was a tree developed solely on Ancestry.

Tom ve3meo


thejerrybryan

Problems with Extremely Basic Queries

thejerrybryan
08 July 2017 18:55:17

I have run into error messages with very basic queries that shouldn’t have anything to do with RM 7.5, e.g. SELECT S.* FROM SourceTable AS S; The error messages do not seem to prevent the query from completing successfully. If the error messages persist and I cannot figure out what the problem is, I will post more details. I’m aware that you don’t even need a query so basic because you can get the same info by double clicking a table name. But I usually follow up such a query with another one with a WHERE clause or some such.

Jerry


thejerrybryan

thejerrybryan
09 July 2017 13:12:01

This appears to be solved. I ran all the database tools, and the problem went away – even though “Test database integrity” showed no problems before running the other tools. So whatever the problem was, it surely was not a 7.5 problem. I’m just super-sensitive to such things because 7.5 added a table.

Check RootsMagic Database Integrity on Opening #pragma #database #integrity #batch

Here are some tricks using a shortcut and a Windows command file (.bat file for old DOS programmers) in conjunction with the command line version of SQLite3. The shortcut, which you can place in your Start menu, on your desktop or wherever it is convenient, calls the batch file and passes the path and name of the RootsMagic database file you want to work on. The batch file calls SQLite3 to open the database file and run the quick integrity check on it. The results are displayed in the command window, SQLite exits and closes the file, and the batch program awaits a keypress so that the user can view the results. On keypress, the batch program calls RootsMagic to start and open the database file.
CheckIntegrityOnOpening.png

The batch or cmd file can be placed anywhere that you think is appropriate as you will point the shortcut to it. You will need to edit the batch file to change the path to sqlite3.exe to wherever you install it.

Download the command line version of sqlite3 from here – look for the ZIP file below the heading Precompiled Binaries For Windows, about 2/3 of the way down the page, beside the line A command-line program for accessing and modifying SQLite databases. As of writing, the version is 3.6.23. Extract the file sqlite3.exe to the folder of your choice and copy its path to replace that in the batch file Any family tree.bat listed under its download link below (.bak extension added due some systems’ security).
Any-family-tree.bat

Any-family-tree.bat.bak

ECHO OFF
REM Any family tree.bat
REM by Tom Holden 2010-05-28
REM Calls sqlite3 to open the RootsMagc database file path and name passed as a parameter
REM  and do the quick integrity check on it.
REM  Waits for user to view result until a key is pressed.
REM  Then launches RootsMagic to open the database.
REM
ECHO ************************************************
ECHO CHECKING INTEGRITY of RootsMagic SQLite database
ECHO %1
ECHO ----------------
"D:Program FilesSQLitesqlite-3_6_22sqlite3.exe" %1 "PRAGMA quick_check;"
ECHO ************************************************
ECHO When ready to open this file in RootsMagic,
PAUSE
"C:Program FilesRootsMagic 4RootsMagic.exe" %1

The shortcut, in this example named Some family tree as seen on the title of the cmd window , has the following properties:

  • Target = “D:MyDocsFamilyTreeHolden-Cudworth_Wilson-WasonAny family tree.bat” “D:MyDocsFamilyTreeRM4EmilEmptyDatabase.rmgc”
  • Start in = leave empty
  • Shortcut key = None (or change it to what you want)
  • Run = Normal window

You will have to set the Target to point to the full paths to “Any family tree.bat” and to your database file. The use of quotation marks is essential if there is a space character in the pathname.

To create a shortcut to the batch file, right-click on it in Windows Explorer and select the corresponding menu item. Then right-click on the shortcut file just created to edit its properties. Then drag and drop it to wherever you want. You can make shortcuts for multiple databases, one per database, the only difference being the pathname for each database file and a unique name for each shortcut if they are altogether in one folder.

In my case, I have named a shortcut to my main database My family tree and placed it in the Windows Start Menu:
CheckIntegrityOnOpeningShortcutStartMenu.png

One of the neat byproducts of starting RootsMagic this way is that one can use relative paths in its Tools > Program Options > Folders settings:
FolderOptionsRelativePaths.png
Provided the folders exist as sub-folders of the one containing the opened database, RM4 will use them. If they do not exist it will default to My Documents folder. Of course, you may want to have some of these folders the same, regardless of where the database file is located; you would enter the conventional, full, absolute path for each of those.

Check RootsMagic Database Integrity Why? How? (if you didn’t get here from there, it’s worth a reading)

Discussions & comments from Wikispaces site


Geraniums

RM 5 questions

Geraniums
10 March 2012 18:40:46

How do I use this query with RootsMagic 5?

If I already have SQLite installed, do I have to get the sqlite-shell-win32-x86-3071000.zip from
http://sqlite.org/download.html ?

Is the following another way to check the database in RM5?

You wrote, “Running a full GEDCOM export of everyone in the database is a more relevant test for corruption. If it does not complete, the database is certainly corrupted.”

That was at this forum discussion: http://forums.rootsmagic.com/index.php?showtopic=8541

Wow, that was 2 years ago and still there’s no RM database integrity check built into the program!


Geraniums

Geraniums
10 March 2012 18:51:14

I just remembered that doing the gedcom test would require that you first go to Lists > Fact Types and change every fact type to “Yes” in the GEDCOM section. That’s a lot of work! But I guess it’s less work than trying to fix a broken database.

GEDCOM & DnD Event Description Length Anomalies & Bugs #gedcom #events

This page complements the thread in the RootsMagic Forums titled GEDCOM & DnD Event Description Length Anomalies & Bugs. (2024-01-04 URL updated to The Wayback Machine)
It reports issues that arise when the values entered in the Description fields are too long. On this page are links to the backup file of the test database and to the GEDCOM file it exported plus SQLite scripts with which a new test database can be created.

AllFacts-2014-08-22.rmgb A backup of the test database file. Persons 1 & 2 are the original persons; RINs 3 & 4 are after the originals were dragged’n’dropped to another database and back again, which database did not have all fact types set with Descriptions enabled so there is some loss; RINs 5 & 6 were a second bounce off the other database with all fact Descriptions enabled.

AllFactsWidthTest.ged GEDCOM export of the original persons (RINs 1 & 2) from the test database from which RootsMagic imported only the persons, no events. Event/Attribution descriptions all exported with full 256 character value. even though GEDCOM prohibits some and constrains all others to lengths such as 248, 90, 30, 2.

AllFactsWidthTestGenerate.sql SQLite script to run against a test database comprising one couple having RINs 1 and 2. Generates a script to be copied into the editor of the SQLite manager and run against the same database. SQLiteSpy recommended. Cannot seem to get a text copy of the generated script from SQLite Expert Personal.

AllFactsWidthTestParameters.sql Two SQLite queries: one enables Descriptions for all Fact Type; the other assigns values to all other fields of the events in case <null> values themselves are having an adverse effect (none noted with the original persons’ events).