|
By text, I meant just detail the steps you take to create the lists and columns step by step (i.e. i click here, type in this here, paste in this here...etc)...not a biggie.
I started thinking about it and realized what I had done in my initial formula that is messing you up, so I decided to go ahead and try creating the list to test things.
Here's what I have:
Create a new "choice" column called "UserColumn" and enter in the choices: User1 User2 User3 User4 User5 User6 User7 User8
Create a new calculated column and enter in the following formula:
=IF(UserColumn="User1","Color=Red",IF(UserColumn="User2","Color=Blue",IF(UserColumn="User3","Color=Yellow",IF(UserColumn="User4","Color=Green","Colorcalc2"))))
Note the "Colorcalc2" in quotes at the end - this is important to enter it in like this since we havent created the second column yet and it will throw an error if its not in quotes.
Create another new calculated column called "Colorcalc2" and enter in the following formula:
=IF(UserColumn="User5","Color=Orange",IF(UserColumn="User6","Color=Tan",IF(UserColumn="User7","Color=Purple",IF(UserColumn="User8","Color=Gray","FALSE"))))
After creating it, go back to the first calculated column and remove the quotes around the "Colorcalc2" reference at the end of the formula so it will now see the second column.
In each of the two formulas, you'll see that I've put the "User#" inside quotes. Since our values in the text column are text values (strings), you need to specify it that way so it recognizes the values. Also, think of the "Color=###" sections as placeholders that you'll use for your actual formula for generating the backgroud colors on the calendar - just replace each of those with the html that will be rendered from Christophe's scripts (those from his site at pathtosharepoint.com).
Now, when you create a new item on the list, when you choose "User1 - User4", it will get the color from the first calculated column, and when you choose "User5 - User8", each of the "IF" statements in the first column will return "FALSE", and since the last "FALSE" is a reference to the second calculated column, it will continue just as if you all of the IF's together in a single formula by continuing on in the the logic detailed in the second column. Once it finds an "IF" that evaulates to "TRUE", it takes the "TRUE" result (one of the colors), and passes it back to the first column where it will then be displayed.
I was thinking more psuedocode-like when I originally posted my formula, so apologize for not being clearer (my bad).
Hopefully this clears things up some,
- Dessie
|