Formatting list views

Formatting list views

About formatting views

Improve the display of views in SharePoint lists with formatting. The view-formatting text describes the elements that are displayed and their display style. The data in the list doesn't change.

Anyone who can create and manage views in a list can access view formatting from the View options View Options button   menu.

View formatting example

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": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
  "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.

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

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×