This is because the colours are written to a variable, a variable name cannot contain any operators.
For example :
A or B
C and D
A & B
I only came to realise this after a few of our users reported a lot of black colours, after looking closer, I realised they where using status like
Off / Holiday and MOT / Service
So after a little bit of 'experimenting' here is a solution.
I have tried to write it using a newer calendar version, but it may not be 100% correct since I use my own colour coding implementation...
Basically, the idea is to strip out any operators before creating the variables and also before creating the arrays used by the calendar
So, A & B becomes AB or Yes AND No becomes YesNo
Script : Load Source Colors (or Apply Color Settings in new versions)
Change the code to substitute out these operators, before building the evaluate string
- Code: Select all
Let (
NewStatus = Substitute ( CalendarColors::Name ;
[" and " ; ""] ;
[" or " ; ""] ;
[" & " ; ""] ;
etc .....
[" not " ; ""]
) ;
Evaluate ( "Let ($$sc_Color" & NewStatus & " = " & CalendarColors::ColorRGBValue & " ; \"\")")
)
Then in Write One Filemaker Event in iCal Format, edit the line which gets the status
- Code: Select all
Set Variable [$scical_Status; Value: Substitute ( GetField ($$sc_FieldForStatus) ; [" and " ; ""] ; [" or " ; ""] etc etc etc ) ]
As mentioned above, I have modified my own integration which may differ from later versions of SeedCode Calendar, so it may need adapting to work in the current version. But the principle should be the same.