Column Formatting Web Part

column-formatting-web-part

When a client asked me if they could colour code the documents in a library, I wanted to provide them with a relatively easy solution. Little did I know, at that point, just how easy it would be! 

Microsoft Column Design Feature 

Microsoft has recently introduced a design feature on choice and date columns. It enables an end-user to add colour to the background of each entry within a column. It’s as simple as a few clicks!  

To access this feature, you click on the ‘v’ to the right of the column title, select Column settings and then Format this column. A wonderful pane opens on the right of the screen, as seen below. Click on Edit Template and select a colour for each choice. Could it get much simpler?

format-document-type-column
column-formatting-sharepoint
column-formatting-sharepoint-2

Column Formatter Web Part

Another easy option to format columns is the Column Formatter web part. It gives the user several different formatting options for many of the other columns[1].

The Column Formatter, available in modern experience, sits on a web page as a web part. It can be applied to any list or library within your SharePoint site collections. Column Formatter was created to make writing and applying column formatting easier and faster for both developers and end users.

It is as easy as clicking new and selecting a ready-made template to meet your formatting needs.

Each column type has multiple options that are associated with it. For example, for choice columns, you can create a flow, incorporate a map for location data. You can add a severity colour code which can be applied to any choice option (e.g. document type, security classification). You could also add a Twitter pic rendered into the column where there is a Twitter handle.

[1] Excludes: Currency, Calculated, Task Outcome, External Data, and Managed Metadata.

column-type

It couldn’t get much easier for the end-user to make lists and libraries more visual and meaningful.

The image below is for Severity, but as mentioned, it can be used for any column choice you want. This is shown in the image below, labelled ‘Security classification’.

conditional-values-sharepoint

Security classification:

conditional-values-sharepoint

The number column options are incredibly useful for providing visuals of trends, targets, quotas, any measurements relevant to your organisation.

Below is a list representing sales compared to the target. And if you don’t like those colours, you can change them! There are several options to choose from.

sales-target-demo

Benefits of the Column Formatter

The simplicity of the Column Formatter is one of its main benefits. Once it has been added as a web part, any end-user with edit permission can format columns for their lists and libraries.

Another benefit is that data can now be displayed visually, which is sometimes more meaningful than a column of numbers or words. Visual representations are often easier to understand, faster to analyse, and from an aesthetic point of view, nicer to work with.

Besides the visual aspect, functions such as sending an email, displaying overdue items, having a quick action link, and creating a ‘start flow’ button to an item are fantastic features that no longer have to be raised as support tickets with your IT team. Rather they can be completed within minutes by the user as soon as they need it.

If you are more technical and want to write your own code instead of using templates, or edit the existing codes, those options are available too. This tool is perfect for all levels of technical experience.

For me, I am thrilled that formatting columns is no longer a task I dread. Neither is it something that eats up half my day struggling to edit a JSON code. Now, I can happily report back to the client, ‘Yes, you can colour code your documents. And no, you don’t need to raise an IT support ticket to do so!’

Missed the webinar? Watch it on catch up, now!

modern-experience-web-parts