Back to column formats
Column formattingSharePoint Online

Incident Action Buttons

Adds Escalate and Resolve buttons to incident lists using column formatting and executeFlow.

Escalate and Resolve buttons in a SharePoint list
Sample preview · View original image

Copy. Apply. Make it yours.

Get this format

1 definition

Review the requirements below, then paste this JSON into the matching formatting panel. Show me where.

Use your list's internal column names and replace any tenant-specific URLs or flow IDs. Formatting is presentation, not a way to secure data.

Column formatting
Download JSON
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "style": {
    "display": "flex",
    "gap": "10px",
    "justify-content": "center"
  },
  "children": [
    {
      "elmType": "button",
      "txtContent": "Escalate",
      "style": {
        "background-color": "=if([$Priority] == 'high', '#287b7d', '#e0e0e0')",
        "color": "=if([$Priority] == 'high', 'white', '#888888')",
        "border": "2px solid transparent",
        "padding": "6px 12px",
        "border-radius": "4px",
        "cursor": "=if([$Priority] == 'high', 'pointer', 'not-allowed')",
        "font-weight": "600",
        "margin": "2px",
        "box-sizing": "border-box"
      },
      "customRowAction": {
        "action": "executeFlow",
        "actionParams": "=if([$Priority] == 'high', '{\"id\": \"<FLOWID_ESCALATE>\"}', '')"
      }
    },
    {
      "elmType": "button",
      "txtContent": "Resolve",
      "style": {
        "background-color": "=if([$Status] == 'new', '#f0f0f0', 'transparent')",
        "color": "=if([$Status] == 'new', '#aaaaaa', '#287b7d')",
        "border": "2px solid #287b7d",
        "padding": "6px 12px",
        "border-radius": "4px",
        "cursor": "=if([$Status] == 'new', 'not-allowed', 'pointer')",
        "font-weight": "500",
        "margin": "2px",
        "box-sizing": "border-box"
      },
      "customRowAction": {
        "action": "executeFlow",
        "actionParams": "=if([$Status] != 'new', '{\"id\": \"<FLOWID_RESOLVE>\"}', '')"
      }
    }
  ]
}

From the contributor

How to use this sample

Summary

This sample adds two context-aware buttons to a SharePoint list for managing incident workflows directly from the list view. It uses column formatting and the executeFlow action to provide inline Escalate and Resolve buttons that trigger Power Automate flows.

screenshot of the sample

Key points:

  • The Escalate button is only enabled when Priority is set to high
  • The Resolve button is disabled when the Status is still new
  • Both buttons are styled using inline JSON and provide a more app-like interaction in SharePoint
  • Uses executeFlow actions to launch Power Automate flows for escalation and resolution handling

View requirements

Type Internal Name Required Additional Information
Choice Priority Yes Values: low, medium, high (all lowercase)
Choice Status Yes Values: new, in progress, resolved (all lowercase)
Single line of text Actions Apply generic-action-buttons.json to this column
  • The format is best applied to a dedicated Actions column (type: Single line of text) that exists solely for button rendering.

Sample

Solution Author(s)
generic-action-buttons.json Luise Freese

Version history

Version Date Comments
1.0 July 16, 2025 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.