In old versions of SharePoint (classic lists, SP 2013, SP 2016) it was possible to create a button via calculated column that changes the value of a column in this item instantly (example at the end of this post if anyone is looking for that solution).
Is there a way to update a column instantly via button in modern Lists without using Microsoft Flow? Flow needs some more clicks and needs some time to react. Hope to see a option that updates a column value directly.
EDIT: I am aware of the solution to start a Power Automate Flow from the List via JSON Button. This takes some time and makes it impossible to change multiple items within seconds. Am looking for another way that is maybe available somehow.
This is the solution for classic lists as mentioned above: just paste it into a calculated column as number and it will update the column "Column1" with the text on the button:
="<div style=""display:inline-flex;"">
"&"<button style=""float:left;
"&"cursor:pointer;width:75px;
"&"background:"&"white"&";""
"&"onclick=""{event.stopPropagation();
"&"this.parentNode.parentNode.parentNode.parentNode.style.backgroundColor=this.style.background;
"&"var C=SP.ClientContext.get_current(),
"&"I=C.get_web().get_lists().getById(SP.ListOperation.Selection.getSelectedList()).getItemById(
"&"this.parentNode.parentNode.parentNode.parentNode.id.split(',')[1]"&");"&"C.load(I);
"&"I.set_item('Column1',this.innerHTML);"&"I.update();"&"C.executeQueryAsync();
"&"return false;} {window.location.reload()}"""&">UPDATE</button>"&"</div>
"&"<img src=/_layouts/images/blank.gif >"