Forum Discussion
Sturberg
Dec 02, 2022Copper Contributor
How to remove the document extension the end of the name column?
Hello, I would like to remove the extension at the end of the doc name? It could even be in a calculated field. Any idea? Also, when I add a doc lib on a page, the column that contains th...
RobElliott
Dec 02, 2022Silver Contributor
Sturberg normally you would format the column with the following JSON, but I don't know if that's possible in SP 2019 On Prem.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=if(indexOf('@currentField','.') > 0,substring('@currentField',0,indexOf('@currentField','.')),'@currentField')"
}
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)
Sturberg
Dec 02, 2022Copper Contributor
RobElliott I'm not able to add json to the doc name column.