Sources – Unreverse Author Names #sources #tmg

To “Unreverse” something is to restore it from a reversed state. Names inadvertently entered into a name type field in a templated source in “reverse” order, i.e., surname, given are not properly handled by RootsMagic 7 and earlier. The resulting sentences for the Footnote, Short Footnote and Bibliography are screwed up. RootsMagic wants entries for name type fields to be in normal or forward order, i.e., given surname and without commas. This would not be a problem for one at a time source creation because it will be readily detected in the sentence previews and can be corrected on the spot. However, it is a much bigger problem if that is the way that many sources were imported, as is the case for direct imports from TMG.

This script unreverses reverse names found in the Author field of templated sources. There may be other name-type fields used in templated sources, e.g., Editor, Compiler, ItemAuthor, Family, Owner, AgencyAuthor, ChapAuthor, BookAuthor, SuplAuthor, …. The script can be readily modified for each one of these.

It reverses correctly those entries having a single name with one comma. It will screw up entries having multiple persons in the one field.

On executing the script, the status display will show that a number of records have been updated. All of the temporary VIEWs that the script creates will be empty and can be manually DROPped and will be gone anyway when the SQLite manager closes the database.

By partially executing the script up but not including the UPDATE statement, the SourceFieldsNew VIEW will show the original SourceTable.Fields value, the extracted name and the unreversed name.

Sources-AuthorUnreverse.sql

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.