Skip to content
TipsSharePoint

SharePoint

JSON Column Formatting Cheat Sheet

Transform bland SharePoint lists into visual dashboards with JSON column formatting. No Power Apps needed.

The Problem

Default SharePoint list views display raw text for every column. Status columns show "In Progress" in plain black text. Priority columns show "High" with no visual distinction. Users scan rows slowly because nothing stands out.

Bad Approach: Plain Text

TaskStatusPriority
Fix login bugIn ProgressHigh
Update docsCompletedLow

No color, no icons, no visual hierarchy. Every cell looks the same.

Good Approach: JSON Column Formatting

Apply this JSON to a "Status" column via Column settings > Format this column:

Code
{
  "$schema": "https://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
  "elmType": "div",
  "style": {
    "padding": "4px 12px",
    "border-radius": "16px",
    "display": "inline-flex",
    "align-items": "center",
    "font-weight": "600",
    "font-size": "12px",
    "background-color": "=if(@currentField == 'Completed', '#d4edda', if(@currentField == 'In Progress', '#fff3cd', if(@currentField == 'Blocked', '#f8d7da', '#e2e3e5')))",
    "color": "=if(@currentField == 'Completed', '#155724', if(@currentField == 'In Progress', '#856404', if(@currentField == 'Blocked', '#721c24', '#383d41')))"
  },
  "txtContent": "@currentField"
}

This renders colored pill badges: green for Completed, yellow for In Progress, red for Blocked, gray for anything else.

Useful Operators

  • @currentField: the value of the current column
  • @now: current date (useful for overdue highlighting)
  • [$FieldName]: reference another column in the same row
  • toString() / Number(): type conversions
  • if(): conditional logic (nestable)

Key Takeaway

JSON column formatting turns SharePoint lists into lightweight dashboards in minutes. No Power Apps license required, no maintenance overhead.