SOLVED

SharePoint List Column Formatting Button Dropdown Select Possible?

Copper Contributor

For SharePoint list formatting, is it possible to have a column that contains a button in each row to where if you select the button, a dropdown list of options appears where you can select an option from the dropdown list to initiate a power automate flow?

 

Mockup example:

Denvermartin_0-1713465351133.png

 

2 Replies
best response confirmed by Denvermartin (Copper Contributor)
Solution

@Denvermartin no, you would need to have 3 columns, each a single of text column with a JSON-formatted button in each that triggers the relevant flow.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

@Rob_Elliott One work around that's not a dropdown list, but you can have multiple buttons in a cell if you aren't wanting to create multiple columns.

Denvermartin_0-1713474043187.png

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "div",
  "style": {
    "display": "flex",
    "flex-direction": "row"
  },
  "children": [
    {
      "elmType": "button",
      "customRowAction": {
        "action": "executeFlow",
        "actionParams": "{\"id\":\"INSERT FLOW CODE HERE\",\"option\":\"Option 1\"}"
      },
      "attributes": {
        "class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
      },
      "style": {
        "border": "none",
        "background-color": "transparent",
        "cursor": "pointer"
      },
      "children": [
        {
          "elmType": "span",
          "attributes": {
            "iconName": "FolderHorizontal"
          },
          "style": {
            "padding-right": "6px"
          }
        },
        {
          "elmType": "span",
          "txtContent": "Add a folder"
        }
      ]
    },
    {
      "elmType": "button",
      "customRowAction": {
        "action": "executeFlow",
        "actionParams": "{\"id\":\"INSERT FLOW CODE HERE\",\"option\":\"Option 2\"}"
      },
      "attributes": {
        "class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
      },
      "style": {
        "border": "none",
        "background-color": "transparent",
        "cursor": "pointer"
      },
      "children": [
        {
          "elmType": "span",
          "attributes": {
            "iconName": "Edit"
          },
          "style": {
            "padding-right": "6px"
          }
        },
        {
          "elmType": "span",
          "txtContent": "Edit"
        }
      ]
    }
  ]
}

 

And if that's not an option, then use power apps to customize a form?

 

1 best response

Accepted Solutions
best response confirmed by Denvermartin (Copper Contributor)
Solution

@Denvermartin no, you would need to have 3 columns, each a single of text column with a JSON-formatted button in each that triggers the relevant flow.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

View solution in original post