Events – Move Short Note to Description #events #tmg #notes

Do you have a lot of empty Description fields for facts or events that you would like to fill with short contents from the corresponding Note field? This might be the case for certain fact types after an import from TMG, directly or via GEDCOM. Or maybe you have chosen to enable the Description field for a fact type after adding many with sentence-useful content in the Notes. This script may help you with that chore.

The query moves content from Event Note to empty but enabled Event Description if the note is 100 chars or less for all such events of a selected Fact Type. To select a Fact Type, you must use a SQLite manager that supports SQLite run-time variables, such as SQLite Expert Personal (SQLiteSpy does not). When the query is run, a box will pop out prompting for the entry of the Fact Type’s abbreviation. This is the label as seen in the Edit Person screen. By entering the wildcard character (%), all Fact Types having the Description enabled will be processed.


Some TMG users exploit its split-Memo capability in which the text is sub-divided by the “||” separator. It may be that a variant of this query would move only the first part (M1) to the Description field provided it is 100 characters or less.

Conversely, given that imported Descriptions may contain the separator, a query that would move everything after it from Description to Note might be useful.


Discussions & comments from Wikispaces site


moving only part, based upon separator, would be awesome!

25 December 2015 21:07:42

I’d love to be able to move only a part of the Note to different fields. When I first used TMG I made copious use of the Note field, with separators. Now, I’m finding I want to move stuff around. But, I want to be particular of what I move, and where. Having a rudimentary understanding of Sqllite, I’m not able to “role my own” right now.


25 December 2015 21:18:34

To be able to programmatically extract something from the Note field requires that it be delineated systematically.

5 Replies to “Events – Move Short Note to Description #events #tmg #notes

  1. When I run this script, I get an error

    cannot start a transaction within a transaction SQL Statement: — EventNoteToDescription-Move.sql /* 2014-08-17 Tom Holden ve3meo Moves content from Event Note to empty but enabled Event Description.

  2. This script requires a sqlite manager that supports runtime variables with an entry form when run, such as SQLite Expert.

    Also, if a database transaction was left open by a previous operation in the current session on that database, that error will arise. Best to close the database from the sqlite manager and then reopen it for this script to run.

  3. Also Tom, I am getting a different message when I try to move description to notes:
    cannot start a transaction within a transaction SQL Statement: — EventDescriptionToNote-Move.sql /* 2016-05-08 Tom Holden ve3meo — adapted from EventNoteToDescription-Move.sql Moves content from Event Description (Details) to Event Note.

Leave a Reply

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