Hello,
Fairly new to Sharepoint and very new to using JSON, so apologies if this is a daft question...
I have a modern Sharepoint list which has within it a Yes/No column (which is called "Available") and I want to highlight the entire row based on this. I have found a sample bit of JSON code:
{
"schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "=if([$Status] == 'Done', 'sp-field-severity--good', if([$Status] == 'In progress', 'sp-field-severity--low' ,if([$Status] == 'In review','sp-field-severity--warning', if([$Status] == 'Blocked','sp-field-severity--blocked', ''))))"
}
I have tested this by adding in a Status column setting the value to 'Blocked' and it works fine, but I can't seem to make it work for my Yes/No column and I don't understand why. I modified the code to this:
{
"schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "=if([$Available], 'sp-field-severity--good','sp-field-severity--blocked')"
}
But it doesn't work. What have I done wrong?
Thanks in advance!
James