SharePoint column formatting

SharePoint priority column formatting: colored flags

Replace the word "High" with a red flag people can spot from across the room, keep the label for clarity, and let anyone change the priority with a click.

A Priority column in SharePoint or Microsoft Lists is usually a Choice column — Critical, High, Medium, Low — and by default every value looks identical: plain text, same weight, same color. That defeats the point. Priority exists so people can find the urgent items first, and text they have to read is not something they can scan.

With a small piece of column formatting JSON, each value gets a flag icon in its own color, escalating from grey through amber to dark red, with the label still beside it for anyone who can't rely on color alone. The cell stays click-to-edit, so re-prioritising is one click rather than a form.

Before and after

TaskPriority
Restore prod backups⚑Critical
Onboarding flow⚑High
Brand refresh⚑Medium
Tidy the wiki⚑Low
Critical = dark red · High = red · Medium = amber · Low = grey
Build this priority flag → Opens the step-by-step guide with priority flags already picked. Type your column’s name, adjust the levels and colors, then copy and paste.

What the SharePoint priority flag JSON looks like

The generator produces JSON like the example below: a flex row with a flag icon whose color is an expression over the field's value, followed by the label. You don't have to write this — it's shown so you know what you're pasting:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "inlineEditField": "[$Priority]",
  "style": {
    "cursor": "pointer",
    "display": "flex",
    "align-items": "center"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "Flag"
      },
      "style": {
        "font-size": "14px",
        "color": "=if([$Priority] == 'Critical', '#a4262c', if([$Priority] == 'High', '#d13438', if([$Priority] == 'Medium', '#d29200', if([$Priority] == 'Low', '#605e5c', '#605e5c'))))",
        "margin-right": "6px"
      }
    },
    {
      "elmType": "span",
      "txtContent": "=if([$Priority] == '', '—', [$Priority])",
      "style": {
        "font-weight": "600",
        "font-size": "12px"
      }
    }
  ]
}

iconName is the interesting part. SharePoint ships the Fluent UI icon set, and any icon name you put in that attribute is drawn as a glyph — Flag here, but Important, Warning, Up and Down all work if a flag isn't your style. The color expression walks down your levels — a nested if(), one link per level — and falls back to grey for any value it doesn't recognise, and the label shows a dash rather than nothing when the cell is empty, so an unset priority is visibly unset. If a level name contains an apostrophe — Client's review — the generator switches that expression to SharePoint's object form, where the value is a plain JSON string; the =if(…) syntax wraps values in single quotes and has no way to escape one.

If you want people to step through priorities rather than pick from a dropdown, two sibling templates do that: Priority Stepper adds − and + buttons that move Low → Normal → High → Critical and stop at each end, and Priority Bars does the same with a signal-strength visual.

How to apply it

The step-by-step guide spells out every click, with pictures. In short:

  1. Click Build this priority flag above. It opens the step-by-step guide with the Priority flags design already picked.
  2. In step 2, type your column’s name, then edit the Levels so they match your column’s options exactly, and pick a color for each.
  3. No Choice column yet? Step 3 shows exactly how to add one, with your levels as its options.
  4. Click Copy my code.
  5. In your list, click the name at the top of your column, then Column settings, then Format this column. At the bottom of the panel that opens, click Advanced mode.
  6. Click inside the box, press Ctrl+A and then Delete to empty it, and press Ctrl+V to paste. Click Preview, then Save.
Most common reason it doesn't work: the name you type has to match the name your list stores for the column, which can differ from the name you see. A column you created as "Priority" is usually Priority internally — but if it was ever renamed, the internal name keeps the original. Step 2 of the guide shows how to check it, or see how to find your column’s exact name.

Common questions

What column type does this need?
A Choice column with your priority values (for example Critical, High, Medium, Low). A single line of text column works too, as long as the text matches the values in the JSON exactly, including capitalization.
Can I use a different icon than a flag?
Yes. The icon is a Fluent UI icon name in the iconName attribute — change Flag to Important, Warning, Up, or Down and SharePoint draws that icon instead. The color logic stays the same.
Why does the flag show a dash instead of a value?
A dash means the cell is empty. The template shows — with a neutral grey flag so blank priorities are visible rather than invisible. Set a default value on the column if you want every new item to start at, say, Medium.
Can people change the priority without opening the item?
Yes. The template sets inlineEditField on the cell, so clicking it opens the native choice picker right in the list view. If you would rather have − and + buttons that step through the levels, use the Priority Stepper template instead.