Formatting list views

You can improve the display of views in lists by adding formatting. The view formatting text describes the elements that are displayed and their display styles. Note that the data in the list doesn't change.

Anyone who can create and manage views in a list can access view formatting from the List settings Views dialog.

An example of a formatted view

A standard view, without formatting, has the same style for every row.

A list without formatting applied

With view formatting, you can highlight rows that meet a condition.

List view with formatting showing yellow, red and green bands

This example applies different styles for rows based on status. Paste the JSON below, including the brackets {}, in the textbox in the Format view panel. Add a column named 'Status' and enter 'Done' in one row to see the style applied.

  "schema": "",
  "additionalRowClass": "=if([$Status] == 'Done', 'sp-field-severity--good', if([$Status] == 'In progress', 'sp-field-severity--low' ,if([$Status] == 'In review','sp-field-severity--warning', if([$Status] == 'Blocked','sp-field-severity--blocked', ''))))"

How to

View formatting is applied using a text format called JSON. However, you don't have to know everything about JSON to format views. JSON is a text based data definition language that defines JSON objects as text pairs. For example, "name": John, or "state": WA are objects.

The easiest way to use view formatting is to start from an example and edit it to apply to your specific field. There is an example above you can copy, paste, and edit for your scenarios.

The full reference on list view formatting JSON has more examples you can copy, paste, and edit.

Need more help?

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?