Forum Discussion

SebastianSzyroki's avatar
SebastianSzyroki
Copper Contributor
May 17, 2023

Approval button in SharePoint list

 Hi 🙂 I have created a list in sharepoint to perform purchase approvals. The list is linked to PowerAutomate. So far my users who can approve orders get a query in Teams and Outlook from approvals....
  • RobElliott's avatar
    May 17, 2023

    SebastianSzyroki you can do this with JSON column formatting. Create a single line of text column and format it in advanced mode with the following JSON. You will need to change the actionParams line to your flow's ID and you can change the CSS in the style section, the icon and the button text in the txtContent line. When the user clicks the button it will trigger the approval flow.

     

     

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "button",
      "customRowAction": {
        "action": "executeFlow",
        "actionParams": "{\"id\": \"50097cde-b800-4c6c-ade9-95be7574f4e5\"}"
      },
    
      "style": {
        "border": "none",
        "background-color": "#f6ec6a",
        "cursor": "pointer"
      },
      "children": [
        {
          "elmType": "span",
          "attributes": {
            "iconName": "Flow"
          },
          "style": {
            "padding-right": "6px"
          }
        },
        {
          "elmType": "span",
          "txtContent": "Send to Manager"
        }
      ]
    }

     

     

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User

Resources