07. Alarms [12:26]

Description: This video provides an overview of how to add, edit and delete alarms in FileMaker and iCal using the iCal Manipulator.


Hi, in this video we are going to take a closer look at working with Alarms.

0:06 Within our demo you will first create an event or a task record. Then you will immediately add that record to iCal. Let’s go do that now. Here I have iCal with 2 calendars, a work calendar and a home calendar in April 2010. Let’s go to FileMaker and open up the demo. We will assume you already have this licensed and registered and ready to go. Let’s import the calendars home and work, and now let’s create a new event. We’ll set it for our work calendar and this month, this is the filter when you import, were not importing at the moment but it’s good to set this so if we do we are ready to go. Then I will create a work calendar. We’ll tell it that we don’t want an all day event, we want a specific time. So we will start this event at 8:00am to 9:00am. Ok, let’s add that now, let’s check iCal, and there it is in iCal ready to go.

1:22 Once the record is created in iCal you can then create an Alarm Record and fill in the following alarm rules within that record. You specify when the alarm goes off and based on that information, you can create an alarm in iCal. What’s interesting about iCal is that you can actually have multiple alarms per event or task. Let’s take a look at Alarm Rules within iCal. First, Alarm Rules as they relate to an event. You get the choices of types: message, message with sound, email, open file and run script. Once you select a type you get the following choices: minutes before, hours before, days before, minutes after, hours after, days after or trigger the alarm on a specific date and time. Please note that the alarm is related to the start date of the event.

2:26 Now let’s take a look at Alarm Rules as they relate to a task record. With tasks, you get the same options for alarm types: a message, message with sound, email, open file and run script. Yet you get slightly different options on when. You can choose the same day, the day before, days before, days after or on a specific date. Please note that when you are adding an alarm to a task, it’s related to the due date of that task. Here we are in the FileMaker demo looking at that event we just created earlier, the one that starts on April 1st at 8:00am to 9:00am. And now we are about to add an alarm. So I will create an alarm here, and I’ve now got an alarm record for this event in FileMaker. And we’ll keep it simple, we’ll just say that the alarm type is a message and we want that alarm to go off 15 minutes before the event start date, which is listed up here. So I will add that it iCal now, let’s go check iCal. Sure enough we have an alarm message going off 15 minutes before the event date. Now let’s add a second alarm. This time we will do a message with sound 3 minutes after the start date. Add that to iCal, and you can see here we now have a second message, the 1st one with 15 minutes before and the second one with a sound 3 minutes after. Notice I can also, if I don’t specify a sound, it brings me to the default but I can also specify any of these sounds here. Like hero…….there it is, Hero. Likewise I can delete a particular alarm, so I will delete the second alarm, the alarm with the sound. And there it is.

5:10 So I can do the same type of thing with tasks. Let’s add a work task……so I’ve got a new task. And let’s say this task is due on the 5th and let’s add that to iCal. I’ll use this button here: Open in iCal. You can see here my task with a due date of the fifth. Ok, let’s add an alarm to this task, and I’ll keep the type message. Notice how we in the demo have programmed it to use message, message with sound and email. If you want to include the other alarm types you can read about them in the documentation. They are not included in the demo for simplicity sake. And in this we will do 2 days before at 8:00am. So let’s add that alarm now to the task, and let’s open it up here. So you can see here, 2 days before I have an alarm going off at 8:00am. I can add another alarm to that same task, 1 day after but we’ll make this one a message with sound and include Submarine. Update that in iCal, open the event and you can see I have my original alarm along with a new one 1 day after at 8:00am with a sound.

7:08 So let’s go take a look at this alarm and take a look at the advanced view. You can see that it’s constructed with the action of sound and a Relative Trigger. Relative to the due date of that task, this is in seconds. So in this case we are doing 1 day after at 8:00am. Relative to the due date we are increasing the alarm 115200 seconds. If we look at the other alarm, the one that says 2 days before, you can see that we’re using this action with a relative trigger to the due date of -144000 seconds, which is two days before.

8:08 So the best way to learn this is to go ahead and create some alarms in iCal and import them into FileMaker. And check out the advanced tab to see how it’s constructed. Let’s go do that now. I’ll set this one with an email and we’ll have that go off at 4/02/2010. Now if you don’t specify a due date for your alarm, you have to specify a time stamp when that alarm will go on, a specific time stamp. If you do specify a due date, you can then choose other options like the same day, the day before, days before, days after or still on a specific date. So if you have a due date you actually get a few more choices relative to that due date. If there is no due date, there’s nothing to do relative to so you will have to specify a specific time stamp. So we’ll do that no, no due date and a time stamp. So let’s go bring that into FileMaker and I’ll import all incomplete tasks. And you can see here this one that we added, the Test Task 3 has no due date but it does have an alarm to ring on a certain date and that date is 4/2/2010 at 12:00am.

9:40 I wanted to take another minute and talk specifically about how iCal handles alarms relative to ID’s and identifiers. So when you are working with alarms in iCal it’s all based on the event or task in iCal. Now that event or task has a unique identifier or a UID. However when you create an alarm for that task the identifier is tied to the master event or task record. And for the 1st alarm, 2nd alarm and 3rd alarm there is no such thing as a UID; rather it’s a simple index number or 1, 2 or 3. So if you wanted to delete alarm 2 for example, you would first open the event or task based on a UID, and then delete the 2nd alarm based on an index of 2. Now these indexes of 1, 2 and 3 it’s actually sorted in iCal by the date and time that’s it’s triggered. So you can reliably determine what alarm to delete based on order if you’re keeping track of that in FileMaker. If your not, you will need to do other accommodations.

11:00 So let’s talk about that now. So adding an alarm is relatively easy. You simply open up the master event record or the task record based on a UID. This is assuming it’s already in FileMaker and already in iCal. You’ll simple re-open that with the command OpenItemWithUID, then you will specify the command AddAlarm. And the parameter for that are the Type, the Absolute Trigger, Action, Emailaddress (if any), Relativetrigger (if any), Sound and URL. And you can continuously add alarms one after another once you open up the record and add the alarm. The index doesn’t become important until you want to edit or delete an alarm. So when you are editing an alarm, you’ll still open up that same calendar record using a unique ID, again that being the event record or the task record, and the best practice maybe the easiest way where you don’t have to keep track of an index is simply to remove all of the alarms for an event or task. Here we show an example of RemoveAllAlarmsFrom (“event”). And then add each alarm one by one. So if you want to edit the second alarm for example, best to just remove all the alarms and re-add them with their new criteria. That way you don’t have to keep track of an alarm index.