I found a great article on color coding a list item based on dates. However, this only works for 2 days within submission. I am trying to have a coding structure that will let me know when something is late. This is the information I am using:
I have a column that subtracts the two dates, then I have another column that uses this script:
="<DIV style='font-weight:bold; font-size:24px; color:"&CHOOSE((IF(SubmissionDateDifference<=2,2,1)),"red","green","orange")&";'>•</DIV>"
With this script, it is only given me the Red and Green colors depending on if the date is greater than 2 days or less than 2 days. I would like to have it give me Red for 0 days and green for greater than 0. When I tried to change the numbers to <=0,0, the formula didn't work.
Also, the final piece in case you were wondering is setting up a web part with the list and below the list is a CEWP with this HTML Script:
<script type="text/javascript">
//
// Text to HTML
// Demo: sharepoint.infoyen.com by Avinash Kumar Dad
//
var cellTDs = document.getElementsByTagName("TD");
var i=0;
var TDContent = " ";
while (i < cellTDs.length) {
try {
TDContent = cellTDs[i].innerText || cellTDs[i].textContent;
if ((TDContent.indexOf("<DIV") == 0) && (TDContent.indexOf("</DIV>") >= 0)) {
cellTDs[i].innerHTML = TDContent;
}
}
catch(err){}
i=i+1;
}
//
// ExpGroupRenderData overwrites the default SharePoint function
// This part is needed for collapsed groupings
//
function ExpGroupRenderData(htmlToRender, groupName, isLoaded) {
var tbody=document.getElementById("tbod"+groupName+"_");
var wrapDiv=document.createElement("DIV");
wrapDiv.innerHTML="<TABLE><TBODY id=\"tbod"+ groupName+"_\" isLoaded=\""+isLoaded+ "\">"+htmlToRender+"</TBODY></TABLE>";
var tBODYTDs = wrapDiv.getElementsByTagName("TD"); var j=0; var cellTDContent = " ";
while (j < tBODYTDs.length) {
try {
cellTDContent = tBODYTDs[j].innerText || tBODYTDs[j].textContent;
if ((cellTDContent.indexOf("<DIV") == 0) && (cellTDContent.indexOf("</DIV>") >= 0)) {
tBODYTDs[j].innerHTML = cellTDContent;
}
}
catch(err){}
j=j+1;
}
tbody.parentNode.replaceChild(wrapDiv.firstChild.firstChild,tbody);
}
The link for this assistance came from
Any assistance will be greatly appreciated.