Skip to main content
deleted 13 characters in body; edited tags
Source Link
Ganesh Sanap - MVP
  • 46.4k
  • 22
  • 31
  • 63

I have a Choice column in my SharepointSharePoint list, with these column choices set:

  • Niet verzonden
  • Aangevraagd
  • Goedgekeurd
  • Afgekeurd

What i am trying to accomplish is to create a button from that Choice column. So when the user clicks on that button a Power Automate flow wil be executed and displays a Microsoft Form. The choices above will be set by Power Automate depending on the choice the user makes in the Microsoft Form. The only think i need is to specify the choices of the choices column in the JSON:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"edf627d9-20f4-45ba-8bc9-4494bf2ff1be\"}"
  },
  "attributes": {
    "class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
  },
  "style": {
    "cursor": "pointer",
    "min-height": "24px",
    "min-width": "130px",
    "display": "inline-flex",
    "align-items": "center",
    "text-overflow": "ellipsis",
    "overflow": "hidden",
    "white-space": "nowrap",
    "box-sizing": "border-box",
    "padding": "4px 8px 5px 8px",
    "margin": "9px 0px 9px 0px",
    "border-radius": "14px",
    "border-width": "=if(@currentField == 0, '1px', '0')",
    "border-style": "solid"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "OpenInNewWindow"
      },
      "style": {
        "padding-right": "6px"
      }
    },
    {
      "elmType": "span",
      "txtContent": "Send to Manager"
    }
  ]
}

Gr. P

I have a Choice column in my Sharepoint list, with these column choices set:

  • Niet verzonden
  • Aangevraagd
  • Goedgekeurd
  • Afgekeurd

What i am trying to accomplish is to create a button from that Choice column. So when the user clicks on that button a Power Automate flow wil be executed and displays a Microsoft Form. The choices above will be set by Power Automate depending on the choice the user makes in the Microsoft Form. The only think i need is to specify the choices of the choices column in the JSON:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"edf627d9-20f4-45ba-8bc9-4494bf2ff1be\"}"
  },
  "attributes": {
    "class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
  },
  "style": {
    "cursor": "pointer",
    "min-height": "24px",
    "min-width": "130px",
    "display": "inline-flex",
    "align-items": "center",
    "text-overflow": "ellipsis",
    "overflow": "hidden",
    "white-space": "nowrap",
    "box-sizing": "border-box",
    "padding": "4px 8px 5px 8px",
    "margin": "9px 0px 9px 0px",
    "border-radius": "14px",
    "border-width": "=if(@currentField == 0, '1px', '0')",
    "border-style": "solid"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "OpenInNewWindow"
      },
      "style": {
        "padding-right": "6px"
      }
    },
    {
      "elmType": "span",
      "txtContent": "Send to Manager"
    }
  ]
}

Gr. P

I have a Choice column in my SharePoint list, with these column choices set:

  • Niet verzonden
  • Aangevraagd
  • Goedgekeurd
  • Afgekeurd

What i am trying to accomplish is to create a button from that Choice column. So when the user clicks on that button a Power Automate flow wil be executed and displays a Microsoft Form. The choices above will be set by Power Automate depending on the choice the user makes in the Microsoft Form. The only think i need is to specify the choices of the choices column in the JSON:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"edf627d9-20f4-45ba-8bc9-4494bf2ff1be\"}"
  },
  "attributes": {
    "class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
  },
  "style": {
    "cursor": "pointer",
    "min-height": "24px",
    "min-width": "130px",
    "display": "inline-flex",
    "align-items": "center",
    "text-overflow": "ellipsis",
    "overflow": "hidden",
    "white-space": "nowrap",
    "box-sizing": "border-box",
    "padding": "4px 8px 5px 8px",
    "margin": "9px 0px 9px 0px",
    "border-radius": "14px",
    "border-width": "=if(@currentField == 0, '1px', '0')",
    "border-style": "solid"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "OpenInNewWindow"
      },
      "style": {
        "padding-right": "6px"
      }
    },
    {
      "elmType": "span",
      "txtContent": "Send to Manager"
    }
  ]
}
Source Link

Specify the choices of the choice column in the JSON-code

I have a Choice column in my Sharepoint list, with these column choices set:

  • Niet verzonden
  • Aangevraagd
  • Goedgekeurd
  • Afgekeurd

What i am trying to accomplish is to create a button from that Choice column. So when the user clicks on that button a Power Automate flow wil be executed and displays a Microsoft Form. The choices above will be set by Power Automate depending on the choice the user makes in the Microsoft Form. The only think i need is to specify the choices of the choices column in the JSON:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"edf627d9-20f4-45ba-8bc9-4494bf2ff1be\"}"
  },
  "attributes": {
    "class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
  },
  "style": {
    "cursor": "pointer",
    "min-height": "24px",
    "min-width": "130px",
    "display": "inline-flex",
    "align-items": "center",
    "text-overflow": "ellipsis",
    "overflow": "hidden",
    "white-space": "nowrap",
    "box-sizing": "border-box",
    "padding": "4px 8px 5px 8px",
    "margin": "9px 0px 9px 0px",
    "border-radius": "14px",
    "border-width": "=if(@currentField == 0, '1px', '0')",
    "border-style": "solid"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "OpenInNewWindow"
      },
      "style": {
        "padding-right": "6px"
      }
    },
    {
      "elmType": "span",
      "txtContent": "Send to Manager"
    }
  ]
}

Gr. P