If you are a SharePoint end user and haven’t heard about the “HTML calculated column” yet, I recommend that you first read this series. You’ll learn how, thanks to a simple script, you can:
– apply color coding to your issue lists
– create progress bars for your task lists
– enhance your contact lists
– open hyperlinks in a new window
If you are already using this method, I’d like to give you a heads up of what’s coming next.
So, what’s up?
I published my first article about using calculated column to write HTML on September 1st. Since then, I have been working on improving this method.
The initial post offered a slick script, but with a significant limitation: it only worked on standard lists (tables, in HTML jargon). The first addition on September 9th, based on users’ feedback, made it work in collapsed views.
I have digged into the SharePoint HTML and scripts, and I think I now have the keys to expand my method further. In the weeks to come, I plan to release updates to:
– make it work in calendar views
– make it work in other views, like the “preview pane”
– improve a couple details (e.g. filtering)
There are multiple specific cases, and the validation requires a lot of testing. For this reason, I’ll release the script in modules as and when they are ready. You can subscribe to my blog feed to be informed of the latest news. If you don’t use RSS, you can leave me your e-mail address at Christophe@PathToSharePoint.com, and I’ll send you notifications of updates.
Also, something I have already mentioned: the script is generic and can be used in several places, in a site or across sites in your site collection. So, instead of doing a copy/paste in the source editor of each CEWP, a better approach is to store the script as a text file in a document library, and use the “link to” option of the CEWP.
How about your existing formulas?
The formulas you have already created will work with the new scripts. The method is generic, and there is no direct connection between the content of a formula and the rendering process.
And other columns?
The new scripts will apply not only to calculated columns but also to text columns. So for example you’ll be able to display a picture – not just text – in the title column of your list. But this requires to type the whole HTML in the text field, so calculated columns should remain the preferred way to generate HTML.
Tutorials and examples
I have noticed that most readers have no problem implementing my examples. But what people are struggling with is how to write their own formula. So I am going to add a couple posts with:
– step by step tutorials on SharePoint formulas and HTML
– more examples / use cases
– hands-on training (never tried this through a blog before…)
Some examples I am working on:
– think “outside the cell”, and for example create a formula that applies color coding to a whole row.
– display presence indicators
– more on progress bars
Is that it?
That’s already enough to keep us – well, especially me – busy for a couple months! But of course if you have other questions or suggestions feel free to contact me.
Can’t wait to see what you come up with!
Hi, I am a complete novice looking for help!
I have a calculated column for growth, shown as a %… I am looking to show any nagative as red (i.e. -58%)
The calculated column I have is ‘Book Growth’ with the following calculation:
=SUM([Book, 2014]-[Book, 2013])/[Book, 2013]
Where do I start with this?
Thanks in advace for your help!