I am trying to conditional formatting a sharepoint list column based on the following rule:
if column "Draft Date" is blank and column "Draft Deadline" is less than today, highlight column Draft Date,
Below is the Json code I pasted to column formatting box, which I had used before, not sure why it didn't work with the new column this time.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"attributes": {
"class": "=if([$DraftDeadline]<=@now,if(toString(@currentField) == '','sp-field-severity--warning', ''),'')"
},
"children": [
{
"elmType": "span",
"style": {
"display": "inline-block",
"padding": "0 4px"
},
"attributes": {
"iconName": ""
}
},
{
"elmType": "span",
"txtContent": "@currentField"
}
]
}