Lock Columns in Document Library sharepoint

Anonymous
2024-01-26T16:22:54+00:00

I would like to lock the columns in my document library.

When I edit the columns I want to see when clicking into a document folder. It will then change the columns on the main document page too.

Is there a way to just edit the columns in a document folder so it isn't replicated all over the document library?

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Anonymous
    2024-01-26T19:32:03+00:00

    Dear CJGT,

    Good day!

    Thank you for posting to Microsoft Community. We are glad to assist. We are looking into your situation and we will update the thread shortly.

    Appreciate your patience and understanding and thank for your time and cooperation.

    Sincerely,

    George | Microsoft Community Moderator

    0 comments No comments
  2. Anonymous
    2024-01-27T02:31:31+00:00

    Dear CJGT

    Please try following these steps to see the outcome:

    1. Go to your document library and click on the gear icon in the top right corner.
    2. Select "Library settings" from the drop-down menu.
    3. Under the "Columns" section, click on the column you want to lock.
    4. Scroll down to the "Column settings" section and select "Yes" for the "Require that this column contains information" option.
    5. Click "OK" to save your changes.

    This will lock the column in the document library, so when you edit the columns in a document folder, it won't change the columns on the main document page.

    Regards,

    Stacey

    0 comments No comments
  3. Anonymous
    2024-01-30T09:34:51+00:00

    Hi Stacey,

    Thank you for your reply.

    How do I edit the columns in the document folders and keep those locked. I want more columns inside the folder than on the document library homepage. For example, I only want owner and name to appear on the library home page.

    0 comments No comments
  4. Anonymous
    2024-02-02T08:40:16+00:00

    Dear CJGT,

    You can create a folder content type with the specific site columns on the site.

    If you are the site owner, you can go to Site Settings(Site Information>View all site settings)>Site columns under Web Designer Galleries>create the site columns such as foldercolumn1 and foldercolumn2.

    Create a site content type (folder content type)>Site content types under Web Designer Galleries>create a site content type such as foldercontenttypeA and add the site columns foldercolumn1 and foldercolumn2 to it.

    Now the site columns are limited to the folder content type foldercontenttypeA not other content types such as files.

    .

    You can create a view such as FolderView showing files and folders with the folder content type columns and set the file-only view scope on the default All Documents view via Rest API and Power Automate.

    In the demo, Rest API calls are the following.

    .

    FolderView:

    Uri: _api/web/lists/getByTitle('library1')/views/getByTitle('FolderView')

    Method:POST

    Headers:

    {

            "Accept": "application/json;odata=verbose",
    
            "Content-Type": "application/json;odata=verbose",
    
            "IF-MATCH": "\*",
    
            "X-HTTP-Method": "PATCH"
    
        }
    

    Body:

    {

                '\_\_metadata': {
    
                'type': 'SP.View'
    
                },
    
                'Scope': 2
    
            }
    

    All Documents:

    Uri: _api/web/lists/getByTitle('library1')/views/getByTitle('All Documents')

    Method: POST

    Headers:

    {

            "Accept": "application/json;odata=verbose",
    
            "Content-Type": "application/json;odata=verbose",
    
            "IF-MATCH": "\*",
    
            "X-HTTP-Method": "PATCH"
    
        }
    

    Body:

    {

                '\_\_metadata': {
    
                'type': 'SP.View'
    
                },
    
                'Scope': 3
    
            }
    

    Result:

    .

    In FolderView, folders appear and you cna see foldercolumn1 and foldercolumn2 appear and these column values are limited to foldercontenttypeA.

    In All Documents, folders disappear and only files appear and the foldercontenttypeA columns disappear.

    Hope that the information above helps you and have a nice day!

    Thank you for your effort and time.

    Sincerely

    Cliff | Microsoft Community Moderator

    0 comments No comments
  5. Anonymous
    2024-02-08T01:37:33+00:00

    Dear CJGT,

    May I know whether the information above helps you?

    If it is convenient, please also send your feedback as follows as it may benefit the community process.

    ![Image](https://learn-attachment.microsoft.com/api/attachments/974db0b7-94b8-41e6-98a0-665778d3aa15?platform=QnA

    0 comments No comments