locked
Hide file extensions in SPO library RRS feed

  • Question

  • Hi, 

    Is it possible to hide file extensions in SPO library?


    Thanks in advance. 



    • Edited by efebo Wednesday, January 1, 2020 3:13 PM
    Wednesday, January 1, 2020 3:11 PM

Answers

  • Hi efebo,

    You could use column formatting to hide file extension. Note: It will change the UI interface. The ellipsis (…) button would be missing, you could right click it as workaround. Also, the file cannot be clickable to open, you could double click the file to open it.

    {
       "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
       "elmType": "div",
       "txtContent": "=substring('@currentField',0,indexOf('@currentField', '[$File_x0020_Type]')-1)"
    }

    Best Reards,

    Michael Han


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thanks!!
    • Marked as answer by efebo Friday, January 3, 2020 2:43 PM
    Friday, January 3, 2020 2:43 PM

All replies

  • Hi efebo,

    You could use column formatting to hide file extension. Note: It will change the UI interface. The ellipsis (…) button would be missing, you could right click it as workaround. Also, the file cannot be clickable to open, you could double click the file to open it.

    {
       "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
       "elmType": "div",
       "txtContent": "=substring('@currentField',0,indexOf('@currentField', '[$File_x0020_Type]')-1)"
    }

    Best Reards,

    Michael Han


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    • Proposed as answer by Marcin Kofi Thursday, January 2, 2020 7:18 AM
    Thursday, January 2, 2020 2:42 AM
  • Hi efebo,

    You could use column formatting to hide file extension. Note: It will change the UI interface. The ellipsis (…) button would be missing, you could right click it as workaround. Also, the file cannot be clickable to open, you could double click the file to open it.

    {
       "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
       "elmType": "div",
       "txtContent": "=substring('@currentField',0,indexOf('@currentField', '[$File_x0020_Type]')-1)"
    }

    Best Reards,

    Michael Han


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thanks!!
    • Marked as answer by efebo Friday, January 3, 2020 2:43 PM
    Friday, January 3, 2020 2:43 PM