Первый пример с $RenewalDate
Попробуйте использовать этот троичный (?) Код оператора
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"color": {
"operator": "?",
"operands": [
{
"operator": "<=",
"operands": [
"[$RenewalDate]",
{
"operator": "+",
"operands": [
"@now",
-2678400000
]
}
]
},
"#ff0000",
""
]
}
}
}
Второй пример - столбец с пробелом в имени $Renewal_x0020_Date
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"color": {
"operator": "?",
"operands": [
{
"operator": "<=",
"operands": [
"[$Renewal_x0020_Date]",
{
"operator": "+",
"operands": [
"@now",
-2678400000
]
}
]
},
"#ff0000",
""
]
}
}
}
РЕДАКТИРОВАТЬ: используя синтаксис выражения в стиле Excel
столбец без пробела $RenewalDate
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"color": "=if([$RenewalDate] <= @now - 2678400000, '#ff0000', '')"
}
}
столбец с пробелом $Renewal_x0020_Date
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"color": "=if([$Renewal_x0020_Date] <= @now - 2678400000, '#ff0000', '')"
}
}