SharePoint List Web Part - Column Formatting Links

Copper Contributor

This post is meant to address why the column formatting for "target": "_blank" doesn't work in the SharePoint list web part.

I have a SharePoint lists which has the Title column formatted to open a link. The JSON is set to open the link in a new tab. This functionality works when viewing the list itself, but when I put it on a page using a List Web Part, the link opens in the same tab.

The real problem is when the link doesn't open in a new tab, after SharePoint navigates, the quick launch isn't updating to the subsite's navigation. I've seen posts on this specific issue before as well. The partial page loading/caching must be causing this. The two issues are somewhat unrelated.

 

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField",
"attributes": {
"target": "_blank",
"href": "='[MySiteUrl]/sites/ops/[mySubSiteName]' + [$ID] + '/SitePages/Home.aspx'"
}
}

 

1 Reply
I also noticed that when I set the link to just "http" rather than "https" it would open in a new tab.