I'm trying to use the in-built tools to format a row in SharePoint online.
It is simple, I want it to highlight the row red when the due date is in the past AND another column value has been set. I use the row formatting to achieve this, but it still picks up blank dates and highlights them red.
How can I get it to ignore empty dates?
Here is the code being used:
{
"$schema": https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json,
"additionalRowClass": {
"operator": ":",
"operands": [
{
"operator": "&&",
"operands": [
{
"operator": "<",
"operands": [
{
"operator": "Date()",
"operands": [
{
"operator": "toDateString()",
"operands": [
{
"operator": "Date()",
"operands": [
"[$Expires]"
]
}
]
}
]
},
{
"operator": "Date()",
"operands": [
{
"operator": "toDateString()",
"operands": [
{
"operator": "Date()",
"operands": [
"@now"
]
}
]
}
]
}
]
},
{
"operator": "==",
"operands": [
"[$ExpiredDocumentUpdated]",
"No"
]
}
]
},
"sp-css-backgroundColor-BgDustRose sp-css-color-DustRoseFont",
""
]
}
}