Sharepoint Button

Copper Contributor

Hello Everyone,

I would like to create a button in SharePoint that, when pressed, enters the following in two other columns, by whom the button was pressed and when this button was pressed. My question is now how I can best implement this or if someone can already show a solution for this.

I thank you

2 Replies

@Tison5 you can do this with a simple flow in Power Automate and a JSON-formatted button.


First, create your columns in the list. In my example I have:

ButtonSingle line of text
PressedOnDate/Time including the time


Next create an instant cloud flow in Power Automate use the SharePoint "for a selected item" trigger.



The first item needs to be the SharePoint "get item" and you select ID from the dynamic box that appears when you click in the Id field.




Finally, add a SharePoint "update item" action.  Select ID and Title (if it's a required column) then for the Pressed column select Yes from the dropdown. For the PressedBy column select Modified By Claims. For the PressedOn column click in the field and when the dynamic content box appears chosse the Expression tab and enter the expression utcNow() and press OK.



In the top left of your flow change the name to something relevant. Click Save in the top right of the flow. Then click the left arrow in the top left of the flow to go to the flow's main screen.


Next copy the ID of the flow:



Next, format your Button column:



and go to the Advanced mode screen:




Copy & paste the following JSON code, changing the text you want in the button (the txtContent line) and making sure that in the actionParams line you change the flow ID to yours. You can also style the button with css:



  "$schema": "",
  "elmType": "button",
  "txtContent": "Press this button",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"70bcc1be-c1af-436c-94a6-50828b1582ef\"}"
  "style": {
    "background-color": "#460302",
    "color": "#ffffff"




Save it. When you click the button the flow will trigger and put in the data into the columns:


Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver) 


@RobElliott thank you very much this really helps me