Sharepoint List- Json for when a text column is not Null change background color of the Name column

Change the background color of one Sharepoint List column based on if another Sharepoint list column is empty, blank or null.
*****Note: This will only work correctly if your Multi-Line Text / String Column is Plain text. Make sure the column is set to plain text. (Not Rich text or Enhanced rich text)

 

This JSON is used in the "Format Current view" and Format columns using "Advance editor" 

 

The below code change the background color of the "TeachesFullName" color if the "Notes" column isn't blank or null.  Use case for us was we needed users to see right away is a teacher had a note on them without needed to click each teacher in the sharepoint list.
You can change the colors to suit your needs.

The JSON:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.sch...",
  "elmType": "div",
  "style": {
    "box-sizing": "border-box",
    "padding": "0 2px",
    "overflow": "hidden",
    "text-overflow": "ellipsis"
  },
  "attributes": {
    "class": {
      "operator": ":",
      "operands": [
        {
          "operator": "==",
          "operands": [
            "[$Notes]",
            ""
          ]
        },
        "sp-css-backgroundColor-White sp-field-fontSizeSmall sp-css-color-White sp-css-color-White",
 "sp-css-backgroundColor-BgGold sp-css-borderColor-GoldFont sp-field-fontSizeSmall sp-css-color-GoldFont sp-css-color-GoldFont"
      ]
    }
  },
  "children": [
    {
      "elmType": "span",
      "style": {
        "overflow": "hidden",
        "text-overflow": "ellipsis",
        "padding": "0 3px"
      },
      "txtContent": "[$TeacherFullName]",
      "attributes": {
        "class": {
          "operator": ":",
          "operands": [
            {
              "operator": "==",
              "operands": [
                "[$Notes]",
                ""
              ]
            },
          
            "sp-field-fontSizeSmall sp-field-bold sp-css-color-LightGrayFont",
            "sp-field-fontSizeSmall sp-field-bold sp-css-color-GoldFont"
          ]
        }
      }
    }
  ]
}

Results:

No notes or Note was deleted:

With a note:

Blog Type: