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 the name of the document is too narrow and cut part of the doc name. I tried to add a json format, but it doesn't work on a page.
We are on SharePoint 2019 On Prem
- RobElliottSilver 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)- SturbergCopper Contributor
RobElliott I'm not able to add json to the doc name column.