Check the demonstration video here
Column formatting is a nice way to customize your modern lists views. But it requires that the columns used in the JSON are referenced in the view.
In this workaround you need a calculated column present in the view. It doesn’t need to be the column you are formating.
For this example, create a column ‘Flow Status’ and a column ‘Color’. The purpose is to show the color in the column status.
Go to the formating panel of column Flow Status
and paste the folowing JSON
If the column color is present in the view, the formating is correct
But, if you hide the column, it not shows the color correctly
So the trick is to make a reference to the Color column without showing it in the view. To do that, the easiest way is to make that reference in the calculated field with a condition that never happens.
The column Flow Status calculated field has a simple formula
what we need to include is a condition that never happens. For example, put in the formula the condition if 1 equal to 2 then show Color else, show Flow status.
This way, the view have reference to the column color and show the format correctly