change color coding on the fly

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 32
Joined: Sun Dec 06, 2009 9:49 am
PostPosted: Fri Apr 09, 2010 7:48 am
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?
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Fri Apr 09, 2010 10:27 am
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
John Sindelar
SeedCode

Return to SeedCode Calendar

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron
(855) SEEDCODE
[email protected]
Follow us: