I want to have different background colors for the different events based on selected categories
Json that I am using
{
“$schema”: “https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json”,
“elmType”: “div”,
“txtContent”: “@currentField”,
“style”: {
“background-color”: “=if(@currentField == ‘Out Of Office - LabOps’, ‘#2BBBAD’, if(@currentField == ‘Out Of Office - Tools & Monitoring’, ‘#4285F4’, if(@currentField == ‘Out Of Office - Billing & Provisioning’, ‘#aa66cc’, if(@currentField == ‘Out Of Office - Infrastructure’, ‘#bbdefb’, if(@currentField == ‘Out of Office - Networking Team’, ‘#cddc39’, ‘’ )))))”
}
}
nothing is changing the background color
can anyone help me here I also looked into this solution and tried to get the json and modified the same for me but still not luck https://sharepoint.stackexchange.com/questions/273991/apply-background-color-to-list-using-column-formatting-based-on-text