SeedCodeCalendarFree

Adding Fields

How can I add my own fields to the calendar?

Overview

Most of the formatting of how things look in the calendar is done on the Source No 1 layout where you specify which field (perhaps a calc) is used for the Summary-- that is the event attribute we show on all the calendar screens. Using a calc for your Summary field lets you show whatever you like on the calendar (perhaps a user's initials and then the event description, for example).

One way to do this is to visit the Source No 1 layout and double click on the Summary field there, selecting to use z_AlternateSummaryCalc instead. The edit the definition of this field to include the additional fields you want to show. So if you've created a field called "thing" for example, your calc might read:

List ( Summary ; thing ; Description )

This will show thing after the summary on the day view and, if your summary is short enough, on the week and month views as well; though the whole calc (summary, thing, and description) will show up in the tool tip when you hover over the event in week and month view.

Day View

You could also place any fields from your events table right on then Day view of the calendar, and you can even make these fields enterable if you'd like, but there are a few caveats about that below.

To add a field to the day view, create a relationship from CalendarRows to SampleEvents like this:

CalendarEventUIDCalc_FirstValue = _id

Where _id is the primary key (the unique ID) in your events table. All this relationship is for is to allow you to add fields right from your events table to the daily view.

Next go to the Day Tab of the calendar in layout mode (see Editing the Calendar Layouts if you don't know how to get to the day tab in layout mode). Then simply add fields from your event table-- that would be a field from Sample Events in the original calendar file.

Enterable Fields

Note that if you allow entry to fields in your events table you may edit information that should cause an event to move or change color. Yet FileMaker won't know to do this just because you edit the field. In such cases you'll need a script trigger on your field (we recommend the OnObjectSave trigger) that will call the script "Refresh Calendar { UseExistingData ; DontRefresh }". Don't send any parameters to the script.

(855) SEEDCODE
[email protected]
Follow us: