Page 1 of 1

change color coding on the fly

PostPosted: Fri Apr 09, 2010 7:48 am
by typeleven
can I script the color coding to be changed on the fly based on different fields? some times I want to code by type sometimes by client. would I be able to assign a color to a contact and have their appointments be that color?

PostPosted: Fri Apr 09, 2010 10:27 am
by John Sindelar
Yes. So basically, our color codes work by looking for a word or words in the event's "status" that match one of the word or words being used as a "status" in Settings / Assign Colors.

So if you want to sometimes color based on Contact and other times on other fields you just need to change our scripts so that sometimes you write the contact's name to our status variable instead. Fortunately there is only one line to change:

Edit the script "Write One FileMaker Event in iCal Format" and find the line where we set the variable $scical_Status. That currently uses a GetField command, but once you've integrated the calendar you can change this to be any calc you want, so for example it might look like:

Code: Select all
If ( SampleContacts::ContactIsSpecial = 1 ; SampleContacts::ContactName ; SampleEvents::Status)


(Note that hard coding this way only works for one source.)

Remember, you still have to have all the possible words you'll be coloring by (the possible statuses, possible contact names) listed as "statuses" in Settings / Assign Colors.

Hope that helps,

John