Forum Discussion
Adding a clickable button to A sharepoint list to update a Yes/No Field
Ewalsh5 there is an easy way to do this with a simple bit of JSON. First of all I've formatted my Read Yes/No column with out of the box conditional formatting, so red if No and green if Yes. Save that. Then format the column again but this time click on Advanced mode. A window will open with the JSON formatting. Scroll down to the very bottom and you'll see the line
"txtContent": "@currentField.displayValue
Add a ,comma after it then hit enter to add a new line before the closing parenthesis/bracket and type:
"inlineEditField": "@currentField"
Then click Save then Cancel to close the formatting panel. Your users can now just click in the read column to change the value from No to Yes.
The other way to do this if you don't want to apply initial formatting is to go straight to the advanced mode of the column formatting an, delete everything that'sthere and paste in
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField.displayValue",
"inlineEditField": "@currentField"
}
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)