I have a calendar view that is viewable over the web with many entries in it. What I would like to do is for a particular entry if the status field = “Approved” then have that entrie’s background color show as green. If Status = “Declined” have the background color for that entry show as red. Etc, etc, etc. I have tried passing through some html table stuff with a background color in columns before and after the entry but no luck.
All help is appreciated
Rob
Subject: Setting A View’s Entry Background Color on The Web
This was similar to a problem that I had (though my problem was in a table).
I resolved it by creating a CSS Stylesheet and using
eg:
@If(
Status = “Approved” ; “<div class="cellgreen">”;
“<div class="cellred">”
)
You’d have to have a “
” at the end of your view entry, but it should work.
Subject: Column Color
Use a “Use value as color” column in your view. I put this column between the column that shows the date of the event (first column) and the column that shows the event text. Here’s the formula I used for the column:
gray:=239:239:239;
yellow:=255:255:208;
green:=224:255:223;
blue:=224:255:255;
red:=255:64:64;
white:=255:255:255;
black:=0:0:0;
none:=-1:-1:-1;
@If(RequestStatus=“Draft”;yellow:none;
RequestStatus=“Waiting for First Level Approval”;gray:none;
RequestStatus=“Waiting for Second Level Approval”;gray:none;
RequestStatus=“Approved”;green:none;
RequestStatus=“Waiting for Trip Report”;green:none;
RequestStatus=“Complete”;blue:none;
RequestStatus=“Denied”;red:white;
RequestStatus=“Cancelled”;black:white;none:none)