Home SharePoint Online SharePoint View Formatting Options

SharePoint View Formatting Options

Following the article – Column Formatting options let’s have the same exercise for this feature View Formatting announced during SharePoint Conference 2018.

This is a summary of the GitHub repository to format SharePoint Online View as of 13/10/2020. It might get outdated as developers update GitHub.

It turns lists view into more visual list of items, articles, anything you’d like.

Click the link on each title to access the detailed page.

First example (done by myself)

From

Image 5.png

To (for example)

hey

Below the list, click the title to see how to implement it.

Bulletin Board

screenshot.png

contact-card-format

screenshot.png

date-conditional-format

listformatting-additionalrowclass.png

Multi-line view rendering

SharePoint list with multi-line view customization

person-currentuser-rowclass

screenshotCombined.png

text-conditional-format

Allow to specify a class with a more simple syntax of json

“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’, ”))”

Document Library Sample

Document Library Sample

Project Indicator – Risk Score Indicator

Color-coded ranges

Project Indicator – RYG Status Format

Color status field

Items in Tile Format

Color status field

This sample uses tileProps element to format the tile layout of the view.

Color status field

Resource Catalog Sample

Resource Catalog Sample

Retail Account Sample

Retail Account Sample

Conditional formatting based on choice field

Formatting based on text field

ContentType Format

Fruit

Conditional formatting based on a Choice field

SharePoint list with view formatted with conditional formatting

Alternating Rows

Alternating Rows

Birthday Row Format

Birthday Format Screenshot

Contact Card Row Format

Light and Dark Themes

Document Library Items in Tiles Format

Responsive Screenshot

Current User’s Rows (link 1)

Current User’s Rows (Using a Multi-Person Column) (link 2)

Light and Dark Themes

User Profile Card

Screenshot

Staff Rota Shifts View Format

Screenshot

Twitter Format

Twitter Format Screenshot

Screen Capture of working Links

Twitter Format Screenshot

Planner Inspired Task Cards

Planner Format

Bar Graph format

Bar Graph Screenshot with animate.css app customiser

Bar Graph Screenshot

Column Graph format

Column Graph Screenshot

Item Hover view

Column Graph with Title Screenshot

Conditional formatting based on date

SharePoint list with view formatted with conditional formatting

Items in Tile Layout

Color status field

Budget Tracker Sample

Summary

The budget tracker sample demonstrates how to use view formatting to format lists and display views of the lists inside connected web parts. This provides the ability to view the budget items associated with individual projects on a single page.

Desktop and tablet view

avatar

Product Catalog Sample

Summary

The product catalog sample demonstrates how to use view formatting to format lists and display views of the lists inside web parts. It also demonstrates how to create links to download documents from the SharePoint Document libraries.

Desktop and tablet view

avatar

Current Year Row Class

Summary

Demonstrates applying a class to rows where a value equals the current year. Can easily be updated to compare other portions of the date such as the month, hour, minute etc. by using the other date-part operators.

Screenshot

Custom Header

Summary

Sometimes it is necessary to remove the standard headers. In those cases, you may still want to show a custom header. This sample demonstrates creating a custom header and only showing it on the first row. The key to this technique is setting the display style attribute to none (hidden) whenever the @rowIndex is not 0 (first row).

screenshot

Creating a custom header removes the standard features such as menus, sorting, moving, resizing, etc. In addition, the sticky header feature is now gone. So an additional sample, custom-header-repeating-format.json is provided that demonstrates drawing the custom header every 30 rows.

screenshot repeating

Custom hover card on List view

Summary

The following image shows a list with a custom hover added to a List view:

On hover – Metadata on the column “Status” is made available via view formatting

screenshot of the sample

generic-video-button

screenshotPage.png

Faq-Format

Summary

This is sample creates an FAQ formatted list. Optionally, you can include the Keyword and KeywordLink columns for the faq-keyword-links-format.json sample.

FAQ Format Screenshot

Default hover card on doclib

Summary

The following image shows a list with a default hover added to a formatted view in a doclib

On hover in a formatted view on a person column a profile card is displayed

screenshot of the sample

Others (no sample)

Wrap up

The official source is github.

What have you used for so far ?

- Advertisement -

19 COMMENTS

  1. Jeff, Jeff, Jeff,Jeff, Jeff – oh my goodness! What fabulous information and I’ve already used some of these codes. But — all I want to do is be able to have alternate rows shaded with colors of my choosing — only one color per list but I can’t seem to find something so simple anywhere!!! Are you able to help? Thanks so much! I’ve already placed this article where I can read it since it has some great info!

  2. Hello Jeff, Great article and thanks for posting. I am a JSON newbie and currently teaching myself. Do you have any examples like this….. I am trying to output a product catalog list into two column output. In each column, simply include a title, description, and “more” button. Thanks in advance! Rod

      • Thanks, how to use the ‘Location’ Column in JSON, for example I have column “Event Location” with “Location” Data Type. I wants to use the City “Event Location: City” in the view.
        It didn’t work when used “txtContent”: “[$EventLocation:City]”.

  3. Hi Jeff. Thanks a lot for the info. Wanted to ask if we can covert one of the column to hyperlink to display all the items in the row (url as ……DispForm.aspx?ID=….). Something of the sort of (linked to item) in sharepoint on premise

  4. Hi! Where can I find information on the view formatting that is displayed in your Article Image (selling items with an image of the item, button for Contact Seller, etc.)? I cannot seem to guess the correct name of the Format, nor find any info on that look online, so any help would be greatly appreciated! Thank you so much!

  5. Hi there. I’m using sharepoint online with moder page.

    I’m trying to apply rows conditional formatting based on a Status column value. However, in the rules this column do not appear, i think it’s because a lookup value. I tryed advanced mode and write my own json code but i can’t make it display anything… it seems it’s invalid. A litle example:

    {
    “additionalRowClass”: {
    “operator”: “:”,
    “operands”: [
    {
    “operator”: “==”,
    “operands”: [
    {
    “operator”: “toLowerCase”,
    “operands”: [
    “[$Status]”
    ]
    },
    {
    “operator”: “toLowerCase”,
    “operands”: [
    “Closed”
    ]
    }
    ]
    },
    “sp-css-backgroundColor-successBackground50”,
    “sp-css-backgroundColor-neutralBackground”
    ]
    }
    }

    It’s not possible to do formatting based on lookup values?

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

CONNECT FOR MORE CONTENT

DO NOT MISS THOSE ARTICLES

SharePoint View Formatting Options

Following the article - Column Formatting options let's have the same exercise for this feature View Formatting announced during SharePoint Conference 2018. This is a...

SharePoint Online Column Formatting Options

sharepoint online column formatting, formattage de colonne sharepoint

How to connect to multiple tenants in Microsoft Teams ! The user friendly guide

So you have Teams for your own company, and your customer invites you as a guest to his tenant (Article - Expand your collaboration with...

Channel vs Chat ? When to use what in Microsoft Teams

Microsoft Teams Users tend to chat privately using the Chat feature naturally. Microsoft Teams Channel are much more powerful though. Summary of some important features...

Recent Comments