Births – Add from Christening or Baptism #birth #events

RootsMagic 7, as does some other software, uses the date of the Christen event as a substitute birth date for age calculations and summary displays when there is no Birth event. But RootsMagic’s own mobile application for iOS and Android does not. Moreover, some users object to using the Christen fact type, on principle or perhaps having already extensively used the Baptism fact type and not wanting to have to change those instances one at a time, just to get the benefit of the auto-substitution. If that is all that is wanted, then the script Facts – Change Fact Type should suffice. This script removes the reliance on auto-substitution by creating a Birth event from the Christen or Baptism event for all persons having one or more of those but no Birth event.

Birth-AddFromChristenBaptism.sql

-- Birth-AddFromChristenBaptism.sql
/* 2017-02-11 Tom Holden ve3meo
For persons having no Birth event but with either a Christen
or Baptism event, adds a Birth event duplicating the CHR or BAPM
event.
 
It does not copy citations or media and does not modify
the Date or SortDate. If a person has both CHR and BAPM, it
copies CHR. If a person has multiple CHR or BAPM events,
it copies only one which with priority given to IsPrimary
and secondly to lowest SortDate.
*/

…and it does not replicate sharers if the source event is shared.

One Reply to “Births – Add from Christening or Baptism #birth #events

  1. A useful query. I am new to Rootsmagic, and new to Sqlite. It took me a while to understand how this works. While I like the idea of creating a birth event to everyone, I didn’t want to just replicate the baptism date. Originally I wanted to create a birth fact with a date estimated a week earlier than the baptism. But on second thought I didn’t want to introduce a date that would most of the time be inaccurate. So I went with using the baptism date with a date qualifier. I wanted a qualifier that I didn’t use elsewhere, so that when perusing my tree I could easily know that a birth date was based on a baptism date. I settled on “By”. So-n-so was born by . After a number of stabs in the dark, I found a way to use the “Birth-AddFromChristenBaptism.sql” with some added code to accomplish my new birth fact.
    Where the code reads:
    INSERT INTO EventTable
    SELECT * FROM vNewBirth
    I substituted the following:
    INSERT INTO EventTable
    SELECT EventID
    ,EventType
    ,OwnerType
    ,OwnerID
    ,FamilyID
    ,PlaceID
    ,SiteID
    ,(SUBSTR(date,1,1) || “Y” || SUBSTR(date,3)) as date
    ,SortDate
    ,IsPrimary
    ,IsPrivate
    ,Proof
    ,Status
    ,EditDate
    ,Sentence
    ,Details
    ,Note
    FROM vNewBirth

    The letter ‘Y’ as the second character in the date string equals “By”. Other letters could be used instead: Before, B; the following are the 13th character: About, A; Estimated, E; Circa, C; Say, S

    And, voila, 2000+ birth facts added, based on baptism dates.

Leave a Reply

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