How It Works
So with no relationship between the calendar and the events table, how exactly does this work?
Check out the following chart...
1. SQL queries find the relevant day/week/month records and write them to a global variable. Additional scripts then look at this variable and make a couple more variables out of it so it is easier for other scripts read: variables like $$sc_ArrayContent.
2. The calendar layout then shows portal rows from the CalendarRows table to draw the day/week/month grid.
3. Finally, calcs in the CalendarRows table look at our global variables for any events on that day and display the relevant content.
The idea here is that no matter how many "cells" we have to draw, the calendar only fetches data from FileMaker Server once, making this much faster than calendars based on multiple portals.