Forum Discussion
jeremyjabrams
May 16, 2025Copper Contributor
SharePoint List JSON, IF Blank Field Formatting
Hello and thank you very much in advance for your valuable insight. I need to format column [REQUEST FORM] with these conditions: IF column [REQUEST] is not blank then display "REQUEST FORM" ...
NehaDhopiya19991
May 17, 2025Copper Contributor
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"condition": "=if([$REQUEST] != '', true, false)",
"elmType": "a",
"attributes": {
"href": "='https://yourformlink.com'", // Replace with your actual form URL
"target": "_blank"
},
"style": {
"color": "#0078d4",
"text-decoration": "underline"
},
"txtContent": "Request Form"
}
]
}
Notes:
Replace "https://yourformlink.com" with the actual URL to your form.
It uses a condition to only render the <a> tag (clickable link) if the [REQUEST] field is not empty.
If [REQUEST] is blank, nothing will be rendered.