SharePoint Column Formatting


Earlier this year, Microsoft introduced SharePoint Column Formatting within SharePoint Lists and Libraries for SharePoint Online. Now, cast your minds back to Microsoft Frontpage, or SharePoint Designer and the Data View Web Part. You may recall how easy it was to configure some conditional formatting, or data formatting without writing a single line of code. That was simple for citizen developers to achieve, but perhaps a headache for SharePoint Administrators to support, especially when it was time to migrate!

So, I was delighted to see that Microsoft have introduced a way to add SharePoint column formatting within the browser for SharePoint list and libraries. You can pretty much see your column values displayed in any way you want to, without hacking away in SharePoint Designer. But is it easy to accomplish as a Citizen Developer? Let’s find out….

To set the scene, the Lightning Tools team recently visited the European Collaboration Summit in Mainz, Germany along with the first 100% electric rally car, and a rally simulator. The fastest times were recorded to complete a lap in the rally car sim. Some conference attendees completed a good track time with just a few attempts, whilst others got a little bit more competitive. Those track times were recorded in a list which you can see below:


The Lightning Tools Rally Car outside the European Collaboration Summit


The list is only made up of a few entries, as I wouldn’t want to share any personal data now that we have gone beyond the 25th May 2018. But, use your imagination, and you’ll realise how difficult it would be to see who had the most attempts and the fastest track times when there are hundreds of rows. You’d have to rely on filtering and sorting.

SharePoint List without Column Formatting

Rally Track Times without Column Formatting

So, during a breakout session, I presented SharePoint column formatting to our SharePoint list. The column formatting included data bars to show the shortest track time, check boxes for the yes/no completed track field (some attendees didn’t complete the track),  the number of attempts field is shown as a donut, the track is shown on a mini map, and we have the ability to tweet the winner using an action and a Microsoft Flow.

SharePoint List Column Formatting

Rally Track Time with Column Formatting

As you can see, the column formatting makes it so much easier to make sense of the content at a glance.

Applying Column Formatting

There are a couple of methods to apply column formatting.

1. You can apply column formatting to an existing column by selecting the column drop down and choosing column settings –> format this column. 

SharePoint Column Formatting

2. Or you can apply column formatting during the creation of the column, or by editing the properties of the column.

SharePoint Column Formatting

You can also apply the column formatting to a Site Column which would allow you to consistently apply the same column formatting to multiple lists that use the site column or content type.

Learning What Can Be Achieved

Using SharePoint Column Formatting, you compose JSON which enables you to format data in many ways. You can highlight content based on a condition, display data bars, call flows, link to content, display trends and much more. Rather than re-invent the wheel, Microsoft have produced a superb article describing what can be achieved and how to achieve column formatting within this article:

Who Applies Column Formatting?

SharePoint Column Formatting is created using JSON, which begs the question as to who will create it. Writing JSON is beyond the capabilities of SharePoint citizen developers, and therefore it will become the role for a Professional Developer. That then becomes a maintainability and support issue for your organization. Each time a user requires a change, it will need the professional developer to make that change. Fortunately, a Microsoft MVP by the name of Chris Kent has come to the rescue and has built a user interface to generate the JSON code.

SharePoint Column Formatter

Column Formatter 1.2 used to build column formatting code

To use the Column Formatter:

1. Initially, you choose the field type that you will be applying column formatting to:

SharePoint Column Formatter

2. Select the type of Data Visualization

SharePoint Column Formatter

3. Set your parameters and apply your style:

SharePoint Column Formatter

4. Copy and Paste the code!

SharePoint Column Formatter

Through the use of the Column formatter web part, Citizen Developers can now generate the column formatting code that they desire. Admins will need to deploy the web part to the App Catalog, but after that.. Applying Column Formatting is once again simple to do.


Related Posts
Clear Filters