Forum Discussion

PerfPC's avatar
PerfPC
Copper Contributor
Nov 09, 2018

List Text colour formatting (New Experience)

Hi All,

 

I currently have a SP List (New Experience) with 2 simple values of "Y" & "N"

 

I have the JSON below which will change the Cell BG Colour to what i state but I'm struggling to find out how to change the text colour inside that Cell, Ideally I would like it black or white, any help here appreciated.

 

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"debugMode": true,
"elmType": "div",
"attributes": {
"class": "=if(@currentField == 'Y', 'ms-bgColor-yellow', if(@currentField == 'N', 'ms-bgColor-blue' ''))"
}}

 

Thanks

No RepliesBe the first to reply

Resources