Integration
Can I Use a Client's file I Already Have?
Sure. See the Clients section for step-by-step instructions.
How Can I Use My Own Appointments File in the Calendar?
Swapping Out the Appointments Table.
In many cases, it will be easier to simply modify the appointments table that comes with CC Calendar SE. However, if you have a complex appointments file 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 define a file reference for the file containing your appointments file and add the key calculation fields from our appointments table to the table in your file. Then, you’ll point CC Calendar SE 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 SE.
Please note that this is a more complicated modification than it was in CC Calendar Pro. This SE version introduces a number of additional fields and calculations to the Appointments table: items you'll have to add to your table to get it to work. While all these calcs use Let() statements to make them easy to modify, this is still a painstaking process. Many users will find it easier to build out from the appointments table in CC Calendar SE.
That said, experienced FileMaker developers will be able to do this pretty quickly by simply looking at the Relationship Graph for CCCalendar_SchedulingEdition.fp7 and the field definitions for the appointments table (CCCalAppts). Even so, the checklist below might be of help.
1. Backup your files. Also you'll be editing some complicated scripts when it comes to re-pointing the repeating events script. Before you get started we suggest you print all CCCalendar.fp7 scripts to a PDF that you can refer back to while you're working. Printing the Relationship Graph and Field Definitions as PDFs is also prudent. While you'll have the original files as backup, it is easier to refer to PDFs while you're working.
2. Adding a File Reference to Your Appointments File. The repeating events feature and the calendar's conflict notification requires a few items be added to your appointments file. Define a file reference for CCCalendar_SchedulingEdition.fp7 in your appointments file, calling it "CCCalendar". Then place three table occurrences on the relationship graph in your file (you don't need any relationships to these TOs yet, just place them on the graph).
From the table "SettingsValues" create a TO called "SettingsValuesDaily";
From the table "Interface", create a TO called "Interface";
From your own Appointments Table (the one in your file) create a TO called "AppointmentsDailyConflicts".
The TOs "CalendarGlobals" and "Interface" will never have anything linked to them. The other two will get relationships assigned to them in the next section.
3. Prepare your Appointments Fields. You'll need to make sure that you appointments file has a few basic fields used to relate appointments to the calendar. Note that you're fields don't have to be named the same as ours, but it can helpful to use the same names as all our documentation (and the Q & A on our "support forums":http://www.seedcode.com/support ) refer to these field names. Even if you don't keep these names long term, using them for the duration of this modification seems like a good idea. You'll need at least the following fields in your appointments file:
Start = ApptDateStart ;
End = ApptDateEndCalc
];
-> The Following 5 fields have a similar structure, you'll edit the beginning of their Let() statements, replacing ApptDateStart, etc. with the corresponding values in your appointments table. These fields are used to display records on the scheduling views and to adjudicate appointment conflicts:
- ApptKeyTimeRangeCalc
ApptKeyTimeRangeCalcEnd
ApptKeyTimeRangeCalcStart
ApptKeyTimeRangeConflictCalc1
ApptKeyTimeRangeConflictCalc2
4. Create a File Reference for Appointments. To point the calendar at your appointments table, you'll add a file reference for your appointments table in CC Calendar SE ; 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. Note: Do not rename the table occurrences in CCCalendar_SchedulingEdition.fp7
5. Repoint Simple Relationships on the Graph in CCCalendar_SchedulingEdition.fp7. Select File / Define / Database from the File menu and select "Relationships" so that you can see the relationships graph. All of the Green table occurrences (TOs) in this graph refer to the Appointments table; currently each of these TOs points to the appointments table in CC Calendar SE. We'll need to change each of these to point to the appointments table in your file. When we do so, the relationships between these TOs will break and we'll need to fix them. Fortunately, this isn't as hard as it sounds.
Lets tackle the first one, the "Appointments" To in the "Table Listing" section of the graph. Double click on this TO and you'll see the "Specify Table" dialog window. Note that the TO is currently from the "CCCalAppts" table and that it is from the "Current File.." (You can see the file attribute in the pop up list to the right of the word "File:" near the top of this dialog.) It is important as we repoint these TOs that we don't rename them. This one is currently called "Appointments" and we'll want to paste that name back in there after we point this at another table. From the "File:" pop up, select your appointments file. You'll now see a list of the tables in your file. Select your appointments table and then change the name of the TO so it continues to read "Appointments." Click "OK" to close the dialog. You've just "repointed" a table occurrence.
You'll notice that your newly repointed TO is now no longer properly related to "AppointmentTypes". To fix this, double click on the relationship line connecting these TOs. Edit the right side of this relationship so that...
...then click OK. You're going to follow this procedure for each Green TO on the graph. Each section of the graph has its own flavor and instructions for specific sections follow. At this point you should go through and do the "simple" TOs. If you've printed a PDF of the original Graph in CC Calendar SE, you can use that as your guide as you repoint and repair each of the following TOs (being careful not to rename them):
-> AppointmentsDailyRepeating
5.1 Re-Point Calendar Relationships. Select File / Define / Database from the File menu and select "Relationships" so that you can see the relationships graph. You'll want to edit all the relationships between the Calendar (in blue) and Appointments (in Green) file. There are a lot of these, but they all follow the same basic format. Lets look at the first one: check out the relationship between Calendar Daily (in blue) and Appointments Daily (in Green). This is in the "Daily Views" section. 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
AND CalLinkTypeCalc = ApptKeyTypeCalc
AND CalLinkTypeHideCalc ≠ ApptKeyTypeCalc
AND CalLinkResourceCalc = ApptKeyResourceCalc
AND CalLinkResourceHideCalc ≠ ApptKeyResourceCalc
You'll need to do this for every green Table Occurrence in the graph. Fortunately, the left hand sides of these will all be fine, but you'll need to re-point the right sides. Be careful and take your time.
There are a TOs that are similar to these Calendar relationships but have slightly different relationship criteria; if you've printed a PDF of the calendar graph you can tackle these as well, using the relationship criteria in the graph for reference:
AppointmentsMiniCalendarDay1-7
AppointmentsMoWk1-7
AppointmentsYear1-7
There are to TOs used for displaying conflicts. These have an appointments TO on both sides of the relationship; repoint these and edit their relationships as follows:
AND ApptUser = ApptUser
AND ApptResource = ApptResource
AND PrimeApptIDX ≠ PrimeApptIDX
AND ApptUser = ApptUser
AND ApptResource = ApptResource
5.2 Hour Relationships. The hour relationships in the Daily and Weekly sections use Date/Time fields instead of Date fields, so hour relationships look like this:
AND CalLinkUserCalc = ApptKeyUserCalc
AND CalLinkUserHideCalc ? ApptKeyUserCalc
AND CalLinkTypeCalc = ApptKeyTypeCalc
AND CalLinkTypeHideCalc ? ApptKeyTypeCalc
AND CalLinkResourceCalc = ApptKeyResourceCalc
AND CalLinkResourceHideCalc ? ApptKeyResourceCalc
The TOs using this kind of relationship are:
AppointmentsHoursVisibleWeek0-7
5.3 Scheduling Relationships. The last (bottom) section of the relationship graph in CC Calendar SE concerns the scheduling layouts. Each of our 10 possible resource columns has three green TOs associated with it. All these relationships follow the structure in 5.3 above, except for the first line where we only use ApptKeyTimeRangeCalc for the middle (2nd) relationship in each 3 TO set. The first of the relationships uses ApptKeyTimeRangeCalcStart and the last (3rd) uses ApptKeyTimeRangeCalcEnd. You can tell which one to use by the name of the TO, as these names end in either Start, Body, or End and use the following fields in the first relationship criteria:
Body ApptKeyTimeRangeCalc
End ApptKeyTimeRangeCalcEnd
Repoint each of these as you did the hours section and take your time. Note that the middle TO in each section is related to an instance of SettingsApptTypes (in Brown). These relationships need to be fixed as well and each has the same definition:
6. Edit the Layouts. Your fields likely don't line up with the fields in our appointments table, 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 (each of the Daily layouts), Week. Month 1 Appointments, Schedule (each of the Schedule layouts), Search Appointments, Mini Window Edit Appointment, Mini Window Edit Appointment Client Info, MiniWindow Show Repetitions, and Appointments Print.
Just a few notes about some of these layouts:
7. 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 SE 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 CC Calendar SE: these scripts are thoroughly commented to make this process easier. However there are too many references to appointments to reproduce them all here: below you'll see a list of the places to check in each script. Look at your PDFs of the original scripts to make sure you select the correct field:
8. Field Definitions. A few fields in CCCalendar_SchedulingEditioin.fp7 look for specific appointment attributes. All of these look for the Serial Number in the Appointments file: PrimeApptIDX. You'll need to review these definitions and make sure they're looking at the right field in Appointments:
9. That's It!