New to the whole JSON code within SharePoint lists, hit a brick wall and having no luck with research.
I require 2 conditional formatting writing into the cod but am not having much look.
First - if the 'Re-Certification Date'(which is a calculated column) is Over 1035+ days = Green 1035 days = Orange 0 Days = Red
To do so I have the below JSON Code wrote:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "=if(@currentField <= addDays(@now,0), 'red', if(@currentField <= addDays(@now,60), 'orange', if(@currentField > addDays([$Certificationdate],1095), 'green','green',)",
"color": "=if(@currentField <= addDays(@now,0), 'white', 'white')",
"padding-left": "10px"
}
}
Is this correct and the simplest way of writing it?
Question 2 - How do i add a second conditional formatting JSON code to the same column so that if the 'Status' column = 'Left the Company' the cell is filled black with black text?? i have tried a few ways and had no success.
Or is it possible to remove the date from the calculated column based on anothers status??
Any help is greatly appreciated!!!
