Question

I have created a calculated field called "Overdue" and provided the below formula as mentioned in the below link. But it is not accepting this formula. Please let me know what might be an issue.

Formula : IF([Due Date]<[TODAY],"#0000FF","#FF0000")

Link : http://www.sharepointkings.com/2009/04/sharepoint-calculated-column-and-jquery.html

Was it helpful?

Solution

As James sugesteed you should put = before your IF statement, but the main problem is that you can't use [Today] in calculated field, but there is a workaround:

1) Create a column caled Today - set it to DateTime and set it to display Today's Date
2) Now you can reference it in your calculated field
3) Remove Today Column and sharepoint will think that [Today] is Todays Date.

Here's the link that also helped me to solve this issue - Today and calculateted fields.
Hope it'll help you.

[EDIT]

I did a little bit more investigetion and found that even if you use this trick next day value of calculated column will still be the same, beacuse calculated fields don’t update themselves until item itself is updated, so thats why calculated columns cannot contain Today and Me - The Truth about using [Today] in SharePoint Calculated Columns.

So if you want to have colored fields you must have something that updates item everyday. Another way is to create several views that displays one category of items (Finished Items, Overdue Items)? but no coloring.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top