Forum Discussion

smithme's avatar
smithme
Brass Contributor
Feb 25, 2021

Simple row color by lookup field

All I am trying to do is color code the rows by the value of a Status lookup field. The documentation says this will work:

 

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "additionalRowClass":"=if([$Status]=='Not Assigned','sp-field-severity--severeWarning', '')"
}

 

However, SharePoint complains that "additionalRowClass" is expecting an object. The schema for "additionalRowClass" can be found https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json#definitions/expression. But it is difficult the determine what the attribute wants just looking at the schema.

 

I can't find an example of what "additionalRowClass" wants to just change the row background color.

 

4 Replies

Resources