« Xojo Meetings in Zuri… | Home | Final Extension of Om… »

FileMaker and Calendar (iCal)

If you need to add events or reminders to the local calendar database on a Mac, you can use our MBS Plugin to do so. We use the appropriate APIs from Apple to talk to the calendar database and read/write events and reminders. As far as Apple supports, we can even read and write calendar entries provided by servers like Exchange or CalDAV. And of course you can install software to sync the calendars to other services or servers.

Since plugin version 3.4 we have the Calendar functions in our plugin. They use the CalendarStore framework from Apple and work fine in FileMaker with 32-bit and 64-bit versions. But Apple deprecated it in OS X 10.8 and some functions don't work properly any more. For example due timestamp for an reminder can't include a time portion, just the calendar date.

Since OS X 10.8 and iOS 6.0 Apple offers a new framework called EventKit. This framework is on Mac for 64-bit only. So you can use it in FileMaker 14 client running in 64-bit mode. Or on FileMaker Server in version 12 and newer. If there will be ever some plugins for FileMaker Go, we may use the same functions there, too.

The new events functions in plugin version 6.2 allow you to use the EventKit framework and do more on calendars and reminders than ever before. Be aware that on first access of a calendar, the user is prompted for permissions.

You can create an event like this:

Set Variable [$c; Value:MBS("Events.NewEvent")]
Set Variable [$r; Value:MBS("Events.Item.SetTitle"; $c; CalendarTest::ItemTitle)]
Set Variable [$r; Value:MBS("Events.Item.SetNotes"; $c; CalendarTest::ItemNotes)]
Set Variable [$r; Value:MBS("Events.Item.SetURL"; $c; CalendarTest::ItemURL)]
Set Variable [$r; Value:MBS("Events.Item.SetLocation"; $c;CalendarTest::ItemLocation)]
Set Variable [$r; Value:MBS("Events.Event.SetStartDate"; $c; CalendarTest::ItemStartDate)]
Set Variable [$r; Value:MBS("Events.Event.SetEndDate"; $c; CalendarTest::ItemEndDate)]
Set Variable [$r; Value:MBS("Events.Event.SetAllDay"; $c;CalendarTest::ItemAllDay)]
Set Variable [$r; Value:MBS("Events.Event.SetAvailability"; $c; "busy")]
Set Variable [$r; Value:MBS("Events.Item.SetCalendar"; $c; CalendarTest::CalendarUID)]
Set Variable [$r; Value:MBS("Events.SaveEvent"; $c; "this"; 1 )]
Set Field [CalendarTest::ItemUID; MBS("Events.Item.CalendarItemIdentifier"; $c)]

This creates a new event, sets properties and stores the ID for the new extra in a text field. This way we can later modify it. We hope you enjoy writing scripts using our new plugin functions.
23 04 16 - 20:07