TMG-RM+Convert+TMG_ID+to+Reference+Number

RootsMagic 6.3.2.0 imports the TMG_ID into a custom fact type TMG_ID. This fact type cannot be displayed after the name of the person. Some users would prefer that it did, either by having it as RIN or by a new feature specifically for TMG. (See also TMG-RM Convert TMG_ID to Record Number)

This procedure makes a clone of the TMG_ID as a Reference # fact which can optionally be displayed after the name. The virtue of both the TMG_ID custom fact and the Reference Number fact is that they are non-volatile when transferred or imported into other databases, unlike RIN.

Because multiple REF# facts are allowed for each person, only the REF# with the lowest record number in the EventTable is displayed. Therefore the procedure also relocates pre-existing REF# facts to the end of the table.

Otherwise, for some arcane reason, adding most any fact edits one of these new REF# facts, until the database has been closed and reopened. Probably, some last record number register in the program has to be updated.
 * N.B. Be sure to close the database from RM before running this procedure**