Forum Discussion

tlangfor's avatar
tlangfor
Copper Contributor
Mar 26, 2025

format group headers to remove column name for a look up column

I need to remove the column name from the header in my SharePoint library, however the JSON I usually use is not working because the grouped column is a lookup column.  When I use my usual JSON, the column header shows [object Object].

I found the following JSON which shows the column name, but still has the column header and file count:

 

 

{

"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",

"elmType": "a",

"txtContent": "@currentField",

"attributes": {

"target": "_blank",

"href": "=if(indexOf([$ContentTypeId], '0x0120') >= 0, '?id=' + [$FileRef], @currentWeb + '/_layouts/15/Doc.aspx?sourcedoc='+ [$UniqueId] + '&action=View')"

}

}

 

Can someone help me to adjust this JSON to show only the column name (no header and no file count)?

Resources