Json Formatting Edit Button

fredericdietrich By On 21/04/2022

In SharepointOnLine

Add an edit button, in field json formatting


{
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
    "elmType": "div",
    "children": [
        {
            "elmType": "span",
            "style": {
                "padding-right": "8px"
            },
            "txtContent": "@currentField.title"
        },
        {
            "elmType": "a",
            "style": {
                "text-decoration": "none"
            },
            "attributes": {
                "iconName": "Edit",
                "class": "sp-field-quickActions",
				"target": "_blank",
                "href": {
                    "operator": "+",
                    "operands": ["www.source=portal&screenColor=rgba%280%2C+176%2C+240%2C+1%29&skipAppMetadata=true&ID=",
                        "[$ID]"
                    ]
                }
            }
        }
    ]
}

 
  • No ratings yet - be the first to rate this.