SOLVED

SharePoint List Default Cell Value if Empty

Iron Contributor

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 would like to populate the cell with "n/a".

 

How could I achieve this? Is this only possible using Power Automate?

1 Reply
best response confirmed by jonboylib (Iron Contributor)
Solution

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')"
}
1 best response

Accepted Solutions
best response confirmed by jonboylib (Iron Contributor)
Solution

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')"
}

View solution in original post