Forum Discussion
Create a button in sharepoint Online
- Nov 28, 2018I'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.
https://www.youtube.com/watch?v=C-oLlVtRrUk
- edok1280Nov 28, 2018Copper 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
- Nov 28, 2018I'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.
- edok1280Nov 28, 2018Copper Contributor
Thank you Chris.
I have already done that , but unfortunately it doesn't work.. It works OK by using the Flow Drop down menu for "Selected Item" .
Can you please check the Json formatting, it says that there is error...
{
"$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”
}}Thank you