* Google calendar of births, deaths and marriages etc

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile
Post Reply
avatar
martinhgregory
Newbie
Posts: 3
Joined: 01 Mar 2021 13:04
Family Historian: V7

Google calendar of births, deaths and marriages etc

Post by martinhgregory » 01 Mar 2021 14:56

I notice that there is quite a good calendar report in v7 but I’d like to take this one step further. I’d like to import the data into a Google calendar.

https://support.google.com/calendar/ans ... a-csv-file

I image this would involve creating quite a complicated query to produce a csv file which could be imported into Google calendar. It would be good to be able to select the people and life events to include.

Has anyone done this with any success?

Thank you

Martin

User avatar
tatewise
Megastar
Posts: 21305
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Google calendar of births, deaths and marriages etc

Post by tatewise » 02 Mar 2021 11:38

Welcome to the FHUG Martin.

I have experimented with a Facts type Query for you that seems to work with some caveats.
Let me review your requirements starting with the last ones:

The Rows filter tab chooses which life events to include based on the Fact Label.
My example includes Birth, Baptism, Marriage, Death & Burial but you can add whatever you like.

The Rows filter tab includes any people included in a Named List.
You can add any selected Individual records to a Name List in the Records Window before using Query.

The Columns tab defines the Subject and Start date columns as specified by Google Calendar.
You could add others if you wish. e.g. Description could be the Fact Note %FACT.NOTE2%.

The Subject column comprises Year Event: Name (Lifedates) similar to the FH Calendar Report.
For Marriage events, the Name is the family couple and the (Lifedates) are the husband's.

The Start date column comprises Month/Day/Year Today
I presume you want Year Today so the Events show on this year's Calendar and not a Calendar way in the past.
If the Month or Day are not defined in the Event then Jan and 1st are substituted.

When run, the Query prompts for a Named List but a predefined name could be hard coded.
From the Result Set use the save as CSV file option and Import that into Google Calendar.
Attachments
Google Calendar.fhq
(2.06 KiB) Downloaded 13 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
martinhgregory
Newbie
Posts: 3
Joined: 01 Mar 2021 13:04
Family Historian: V7

Re: Google calendar of births, deaths and marriages etc

Post by martinhgregory » 03 Mar 2021 14:37

Thank you Mike, this is brilliant.

I may see if I can tweak the query as you suggest by adding something for Google's description and location fields.

How could I add a "true" to a field called "All Day Event" for all records in the query? I suppose I could add this in Excel before importing it into my Google Calendar but this would seem to defeat the object.

Many thanks

Martin

User avatar
tatewise
Megastar
Posts: 21305
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Google calendar of births, deaths and marriages etc

Post by tatewise » 03 Mar 2021 15:20

You can use =Text("True") as the Expression for an All Day Event Column but I found that is the default anyway.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
martinhgregory
Newbie
Posts: 3
Joined: 01 Mar 2021 13:04
Family Historian: V7

Re: Google calendar of births, deaths and marriages etc

Post by martinhgregory » 05 Mar 2021 15:58

I'm trying to add some interesting information into the descriptions field of my calendar from the data in my project.

What expression should I use in my query to calculate how many years ago an event happened? I guess it's something along the lines of =year(today) - %FACT.DATE:YEAR but I've tried many combinations without success.

Also if I'm producing next year's calendar, how can I change the expression from year.today (2020) to next year (2021). Chances are I'd want to produce my 2021 calendar in 2020.

Any pointers would be gratefully received.

Martin

User avatar
tatewise
Megastar
Posts: 21305
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Google calendar of births, deaths and marriages etc

Post by tatewise » 05 Mar 2021 16:23

To select a future year replace
Text( Year( Today() ) )
with
Text( Calc( Year( Today() ) + 1 ) )

To describe how long ago use
=Text( Text( Calc( Year( Today() ) - %FACT.DATE:YEAR% ) ) . " ago" )

The complications are that you must use the Calc(...) function to encapsulate any formulas which produce a number and then encapsulate that in a Text(...) function to convert to text that can be joined with "text strings"

Tips:
When composing these functions make sure they use the form in the FH Help pages.
e.g. Today() even if the brackets seem unnecessary
Ensure the number of opening brackets ( and closing brackets ) are the same. It is easy to forget one.
There must always be an even number of % characters surrounding data refs.
Only put the = sign in front of the outermost function and not any enclosed in ( brackets ).
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply