Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Calendar Event Color Code

  Asked By: Zoe    Date: Jul 08    Category: Sharepoint    Views: 2219

I saw some code that would turn the background color of an event to a different
color based on choice column(TypeOfEvent) and a calculated column. Here is the
code for the calculated column. I keep getting a systax error. Can you tell me
why this is not working? I am just using the same background color until I get
this working.

="<Div style='border:1px solid #333; padding:5px; margin:0px;"
&IF ([TypeOfEvent] ="Green", "background-color:#ffffaa;", IF
([TypeOfEvent]="Blue", "background-color:#ffffaa;", IF ([TypeOfEvent]="Red",
"background-color:#ffffaa;", IF ([TypeOfEvent]="Yellow",
"background-color:#ffffaa;", "")))) & "'> "&[Title]&" </Div>"

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Renata Burt     Answered On: Jul 08

Just a stab in the dark here but with all of those double-quotes it looks like
you are opening and closing your statement.

To start I would wrap the whole thing in parenthesis' instead of double-quotes.
Then you can use the proper double-quote syntax inside with no problem. I
haven't used the calculated  column like this so the syntax could be very
right...

 
Answer #2    Answered By: Lazaro Rutledge     Answered On: Jul 08

There's a free solution that will allow you to enable color  calendars if you're
interested in going that route. Download does include the source code.

PlanetWilson Colour Calendar

planetwilson.blogspot.com/.../...lendar-released.h\
tml

 
Didn't find what you were looking for? Find more on Calendar Event Color Code Or get search suggestion and latest updates.




Tagged: