1

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

1
  • Made sure you've got an equals sign (=) before "IF"? (it's a silly mistake but I've made it before a few times).
    – James Love
    Commented Dec 6, 2010 at 9:45

1 Answer 1

3

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.
2
  • Keep in mind that it will only calculated on an update of the item. Thus, unless you update all items every day the [Today]-trick will not work!
    – Dribbel
    Commented Dec 6, 2010 at 12:02
  • Thanks Andriy & James for your suggestion. I gave up this plan since it will not be updating based on today date automatically. Thanks for your clarification.
    – sankar
    Commented Dec 6, 2010 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.