If you’ve got a list containing important dates (such as the above example), it’s very useful to be able to easily see how long is left before that date, or how long since it has passed. Unfortunately basing a calculated column on the current date isn’t supported by SharePoint natively, as discussed in my previous article: How to use [Today] in a SharePoint list
So how can we work around this shortcoming without having to wave signs and shout outside Microsoft’s offices? The are a few options available to us:
- Designer: Create a custom view in SharePoint Designer.
- Code: Make your own custom field type from scratch.
- SharePoint Highlighter: Buy our custom field type.
Adding a CEWP to each page your list is displayed on can become quite arduous if it’s displayed in a lot of places. In addition to this, information in a CEWP is quite vulnerable to accidental edits, as they are accessible to any user that can edit page content.
SharePoint Designer is a free and powerful tool from Microsoft for customizing SharePoint. Unfortunately, because it can do so much, its use is often frowned upon by site administrators (and sometimes even banned).
If you already have the backbone of a custom field type coded, then adding the XSLT to display this in 2010 should be reasonably straightforward. Alternatively this can be done within the custom field type class.
Creating a custom field type from scratch for this sole purpose is probably going to be remarkably costly (in terms of time). Actually making the foundations of a custom field type is a bit of an investment, but thankfully Microsoft has put together a walkthrough to at least help you get started.
The benefit of using this method is that columns created from a field type are displayed on every page without having to add any additional code to the page itself.
Of course, it is possible to get all the benefits of a custom field type with much less pain: Buy a commercial solution.
So if you’re looking for a commercial solution it looks like we’re the only option. If you know otherwise then please do tell us; but for the time being we’ll cheerfully carry on being the front-runner in this one horse race.