DayBackForFileMaker

Separation Colors

Event colors in list view and mini windows

If your calendar interface and your event-data tables are in different files, ("the separation model"), and you want to show an event's color "on" the event record in list view and in the Event Details mini window, you'll need a table occurrence for the "CalendarColors" table in your data file (it doesn't need to be related to any other T.O.), and you'll need to add the "DBK_ColorCalc" field from our SampleEvents table into the Events table in your data file (just copy/paste it if you have FileMaker Advanced).

The "DBK_ColorCalc" field looks for global variables that are now scoped to your interface file, so you need to create these variables in your data file as well. Here's how:

Create a Cartesian (the "x" operator) relationship in your data file to the "CalendarColors" table from any other table (your "Events" T.O. perhaps?). Then make a new layout called "Calendar Status Colors", based on that same T.O. (e.g., "Events"), and copy/paste the layout contents from the "Calendar Status Colors" layout in the interface file.

Then copy and paste the "Load Calendar Color Coding" script from the interface file into the data file.

Make sure this script runs when your data file opens (note that if this script is set up to be triggered by "OnFirstWindowOpen" and your data file never actually opens in a window, these color settings won't be propagated).

(855) SEEDCODE
[email protected]
Follow us: