Forum Discussion

jonboylib's avatar
jonboylib
Iron Contributor
Aug 24, 2022
Solved

SharePoint List Default Cell Value if Empty

I have a column of type Single Line of Text. When entering data, sometimes the cell will contain data, other times it won't, and can stay empty.   If the cell doesn't contain data, on exit/save I w...
  • jonboylib's avatar
    Aug 24, 2022

    This seems to work.

     

    {
        "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
        "elmType": "div",
        "txtContent": "=if([$field_1] == '', 'n/a', '@currentField')"
    }

Resources