Free Version: How can I use my own Appointments file in the Calendar?
Applicable Versions: Free.
Swapping out a New Appointments table: Free Version
In many cases, it will be easier to simply modify the CCCalAppts table that comes with CC Calendar. However, if you have a complex appointments table that already has a lot of work in it, you may wish to point CC Calendar at that file instead. To do this you’ll accomplish a couple basic tasks. First, you’ll add the calculation fields, from the CCCalAppts table of CCCalendar.fp7 to your file. Then, you’ll point CC Calendar at your file by editing the calendar’s File References, and Relationships. Lastly, you’ll tidy up a few things by reviewing a few layouts and scripts in CC Calendar.
Experienced FileMaker developers will be able to do this pretty quickly by simply looking at the Relationship Graph for CCCalendar.fp7 and the field definitions in the CCCalAppts table. Even so, the checklist below might be of help.
1. Backup your files.
2. Prepare your Appointments table. You'll need to make sure that your appointments table has a few basic fields used to relate appointments to the calendar. Note that your fields don't have to be named the same as ours, but it can help to use the same names as all our documentation (and the Q & A on our support forums) refer to these field names. While you may want a few things like start time and end time, you'll need at least the following fields in your appointments table:
Start = ApptDateStart ; End = ApptDateEndCalc ];
3. Create a File Reference for Appointments. To point the calendar at your appointments table, you'll add a file reference for your appointments table; to keep it simple, name the file reference “Appointments” for now. Go to File / Define / File Reference. Click “New” and then click the “add file“ button to add a line for your appointments file.
4. Re-Point Relationships on the Graph. Select File / Define / Database from the File menu and select "Relationships" so that you can see the relationships graph. You'll want to edit the relationship between Calendar Daily (in blue) and Appointments Daily (in Green). First, you’ll want to redirect the Appointments Daily table from the table which shipped within CCCalendar.fp7 to the appointments table in your file. Double click on AppointmentsDaily and in the specify file dialog presented switch the file from CCCalendar.fp7 to the file reference you just created; select your appointments table but DO NOT allow the table occurrence to be renamed. When you select your table FileMaker will attempt to rename the table occurrence with the name of your table: be SURE to retype “AppointmentsDaily” as the table occurrence name. Click “OK” in the specify file dialog. Now that your fields appear in the Appointments Daily table occurrence, double click on the "X" between these table occurrences to edit the relationship. You'll want to select each line where there is an "unknown" field and select the correct field in your appointments table. While your fields may have different names, the relationship definition should look like this:
AND CalLinkUserCalc = ApptKeyUserCalc AND CalLinkUserHideCalc <> ApptKeyUserCalc
Further down in the graph you’ll see the table occurrences for the month view where there are 7 relationships between the calendarmonthweek table occurrence (in blue) and 7 appointment occurrences in green. Each of these relationships looks like the one described above with the exception of the first field on the left hand side. The first relationship uses CalDateKey0 , the second CalDateKey1, then CalDateKey2, etc. Each of these need to be pointed at the table in your new file reference (without renaming the table occurrences) and have their relationships edited as described above.
5. Edit the Layouts. Your fields likely don't line up with the fields in CCCalAppts, so once your new relationships resolve, you'll need to edit the calendar layouts to make sure the correct fields show up in the correct places. Be sure to edit fields on each of the following layouts: Daily, Month, Mini Window Edit Appointments.
6. Edit Scripts. While you don't need to create any scripts in your appointments file, you do need to edit a few scripts in CC Calendar that set specific fields in the appointments table. As with layouts, your fields may not line up exactly with the original fields. Check the following scripts in CCCalendar (these scripts are thoroughly commented to make this process easier):
7. That's It!