
I have been using this JSON helped with and it has been working great the only issue being the background colour for when the field is empty.
can someone assist? How do I change it that (when the date expires it goes red) (90 days before expiry yellow), green when it's not in 90 days before expiry) and when the field is empty it stays the same as the background.
Any help would be appreciated.
Thank you.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json";,
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "=if(@currentField <=@now ,'#f53337',if(@currentField <=(@now+7776000000) ,'#96882b','#458b50'))"
}
}
