I am using SharePoint online. I have a choice column and a text column, If the choice "phone" is selected from the choice column, I want the text column to change color. For some reason it wont work - both columns are in view, any help would be greatly appreciated!
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"color": "=if([$ContactMethod] == 'Phone', '#66ff33', '')"
}
}
ContactMethod
column allow multiple choices, or just a single choice? – willman Feb 24 '20 at 18:34==
equals comparison is case sensitive, so if your choice is in lower case, but you are comparing with an uppercase'P'
, then it will never match. – willman Feb 24 '20 at 18:58