I'm just getting into column formatting. I'm trying to create the "Create clickable actions" example that was on Microsoft's site explaining Column Formatting in Modern SharePoint Sites using JSON. the example itself is very straight forward, but when I apply it all values in the column disappear. There were values in the column before applying the formatting.
I tried to recreate the same formatting on my Office Developer SharePoint subscription and I had no issues applying and seeing the formatting.
Any suggestions why I wouldn't be able to apply column formatting on an on-premise 2019 server, but I can apply it to an SP online list?
I did update the schema to account for SP 2019 as specified in the documentation ("$schema": "https://developer.microsoft.com/json-schemas/sp/v1/column-formatting.schema.json"
)
Below is the JSON for the column formatting. I've also tried to change @currentField
to [$Stocks]
(the internal name of the column) without success:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v1/column-formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField",
"attributes": {
"target": "_blank",
"href": "='http://finance.yahoo.com/quote/' + @currentField"
}
}