I've went through a bunch of questions trying to find the answer to my questions, but a lot of recommendations don't quite fit into the code that I have. I'm using the formatting that SharePoint provides, which is different than the code that everyone else is posting. Will someone either convert the code I post to show me how to change it to the user recommended code or convert what i have to meet my requirements?
Basically, I have a column with a list of selections (Reinvestigation) and another with the date they record when that action was completed (Reinvestigation Key Date). When a specific option is selected in Reinvestigation (Awtg NBIS Completion), I want the date to highlight red after 12 days have passed. When using the design mode, it only allows current date or a specific date. I tried entering addDays(@now,12) where @now is posted in the code, but it doesn't register.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"box-sizing": "border-box",
"padding": "0 2px",
"overflow": "hidden",
"text-overflow": "ellipsis"
},
"attributes": {
"class": {
"operator": ":",
"operands": [
{
"operator": "&&",
"operands": [
{
"operator": "==",
"operands": [
"[$Reinvestigation]",
"Awtg NBIS Completion"
]
},
{
"operator": "<=",
"operands": [
{
"operator": "Date()",
"operands": [
{
"operator": "toDateString()",
"operands": [
{
"operator": "Date()",
"operands": [
"[$Reinvestigation_x0020_Key_x0020_]"
]
}
]
}
]
},
{
"operator": "Date()",
"operands": [
{
"operator": "toDateString()",
"operands": [
{
"operator": "Date()",
"operands": [
"@now"
]
}
]
}
]
}
]
}
]
},
"sp-css-backgroundColor-BgCoral sp-css-borderColor-CoralFont sp-field-fontSizeSmall sp-css-color-CoralFont",
""
]
}
},
"txtContent": "[$Reinvestigation_x0020_Key_x0020_.displayValue]"
}