I'm very much new to using JSON and I try avoid it where I can. My problem is definitely lack of knowledge.
I'm trying to change the color of column values based on their lookup fields. Originally this was easy enough with one condition. However our scope now includes 6 other conditions.
I thought I was getting somewhere but the values just return a false value regardless. Any help would be appreciated.
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"debugMode": true,
"txtContent": "@currentField.lookupValue",
"style": {
"padding": "0 4px",
"color": "=if(@currentField.lookupValue != 'Action Complete','#168DC8',
if(@currentField.lookupValue != 'Reviewed','#168DC8',
if(@currentField.lookupValue != 'Approved','#168DC8',
if(@currentField.lookupValue != 'Escalation Complete','#168DC8',
if(@currentField.lookupValue != 'QA Checked','#168DC8',
if(@currentField.lookupValue != 'Read Only Reviewed','#168DC8','white'))))))",
"background-color": "=if(@currentField.lookupValue != 'Action Complete','White',
if(@currentField.lookupValue != 'Reviewed','White',
if(@currentField.lookupValue != 'Approved','White',
if(@currentField.lookupValue != 'Escalation Complete','White',
if(@currentField.lookupValue != 'QA Checked','White',
if(@currentField.lookupValue != 'Read Only Reviewed','White','#168DC8'))))))",
"font-size": "14px",
"border-width": "2px",
"border-style": "solid"
}
}