Forum Discussion

edok1280's avatar
edok1280
Copper Contributor
Nov 28, 2018
Solved

Create a button in sharepoint Online

Hi,

I need  to add a button (as seperate column)  in my Sharepoint Online list which will be visible when another column "Approval Status" has 'Pending' value and then when I click this button will change the status of Approval Status from Pending to Approved.

.Approval Status is choice column.

Can you please advise.

 

Thank you

  • I'm fairly certain you can't just click a button to update a field in modern UI right in line in the list, hence why people put buttons for flows to do some action. You need to create your own flow with the logic you want to happen when clicking that button. Once that's done and working by using the Flow Drop down menu for "Selected Item" then you can use the Column Formatter to add a shortcut / Button to that flow and use the ID from the flow etc.

6 Replies

    • edok1280's avatar
      edok1280
      Copper Contributor

      Thank you Chris, Although this link is referred about the MS flows , while I need just to change the status of a specific field by clicking a button.

       

      I tried also to follow the video(Laura) with trigger MS flow but it doesn't work, please see below the json code.

      ere is the json :

       

      {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
      “elmType”: “button”,
      “txtContent”: “Get Approved”,
      “customRowAction”: {
      “action”: “executeFlow”,
      “actionParams”: “{\”id\”: \”4f74601c-6756-43b1-bfed-914a1fc5b321\”}”
      },
      “style”: {
      “background-color”: “purple“,
      “color”: “white”
      }}

       

      Can you please advise..

       

      Thank you

       

       

      • I'm fairly certain you can't just click a button to update a field in modern UI right in line in the list, hence why people put buttons for flows to do some action. You need to create your own flow with the logic you want to happen when clicking that button. Once that's done and working by using the Flow Drop down menu for "Selected Item" then you can use the Column Formatter to add a shortcut / Button to that flow and use the ID from the flow etc.

Resources