I can't get SharePoint Online to recognize my field name. I know I could use @currentfield where I have [$2021_Q3]
but I want to create a more complex formula and can't even get this basic one to work. Below is also the error I receive on the field
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"debugMode": true,
"style":{
"padding-left":"4px",
"border-left-style": "solid",
"border-left-width":"5px",
"border-left-color":"=if([$2021_Q3]=='0','red','green')"
},
"attributes": {
"class":"=if(@currentField==0,'sp-field-severity--severeWarning',if(@currentField==0,'sp-field-severity--warning','sp-field-severity--good'))"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName":"SortUp"
}
},
{
"elmType": "span",
"txtContent":"@currentField"
}
]
}