Note: The following works for SharePoint 2007, 2010, 2013, 2016 and Office 365. SharePoint 2010 and later and Office 365 users should also take a look at Document Sets:
http://msdn.microsoft.com/en-us/library/ee559339.aspx
http://technet.microsoft.com/en-us/library/ff603637.aspx
"How do I add a column (meta data) to SharePoint folders?"
My first thought is to modify the Content Type named Folder, but it is "sealed". (Microsoft locked the door!) So I created a new Content Type based on Folder, added the custom column, added the content type to the library and magically I found my custom folder type in the New dropdown. Here's the steps:- Go to Site Actions, Site Settings
- Click Site Content Types
- Click Create
- Give the new content type a name such as "Enhanced Folder" or "Product Spec Folder"
- Set the parent content type group as Folder Content Types
- Set the parent content type to Folder
- Add the new content type to a Group. I put it back in the "Folder Content Types" group
- Click OK
- Scroll down to the columns section and click Add from new site column
- Name the column and set all the usual column options
- Repeat for any additional columns (Release Date, etc)
- Click OK
- Go to your document library
- Click Settings and Library Settings, or in 2010 click the Library ribbon tab and then click Library Settings
- Click Advanced and set Allow management of content types to Yes and click OK (this may already selected)
- Scroll down to Content Types and click Add from existing site content types and add your new folder content type
- Go to your document library and click the New dropdown, or the New button in the 2010 Document ribbon, and add your new folder!
- Go to the View dropdown and click Modify this view and add your new folder meta data columns (you will probably want to move them to just after the Name column)
45 comments:
Wow, thanks so much. I've been going crazy trying to figure out how to add columns to folders. Well done!
excellent - thanks!
How do you fix it so that you can edit the folder metadata after creation. All I am seeing is the metadata type choice ie. "Folder" or "New Folder type" and the title of the folder. I am not seeing my metadata column so that I can edit it.
"anonymous", just use the dropdown menu for the folder and select Edit Properties, just like any other document.
This is a great tip, thanks very much!
This is great, but it didn't quite work. I see the column I created in my view, but it isn't live and there is not way to add to it. Help!
Kimmy,
What type of column was it? (text, date, choice, etc). What do you mean "it's not live"?
Mike
This is great, and was just what we were looking for, but now when I create a new document in the library with this column in, the new document is asking for the additional column info/text as well. How do I make it only ask for this information when creating a new folder, not a new document, I have set something up wrong? Thanks!
AaronM,
I cannot duplicate your problem. The documents I created in the new folder does not prompt for or let me set or see the meta data fields from the custom folder, just the normal fields for the document content type.
Mike
You are a HERO!
When I create this custom content type, I am only seeing the additional columns I associated to it upon Folder creation time. If I select Edit Properties afterwards I am only seeing the Folder Name field and content type field. Any idea what I did wrong?
MSLinda,
In step 17 above did you create your new folder from the default folder content type "Folder" or your newly created content type? Sounds like you used the default.
In any case if you see the Content Type dropdown in properties you can still change your folder from one content type to another.
Mike
Hi,
How to hide/rename "Name" field which comes up while creating a folder created using folder content types?
Thanks
Anonymous,
The "Name" column is the name of folder, and the name used in the path to the document. So I don't think you can, nor do I think you would want to. A folder without a name?
Mike
Hey Mike,
Thanks for the reply!!!
There are other columns present in the folder content type which I have created and those are enough for me to identity the folder.
Here i need to either rename "Name" field or hide it completely from the user.
Any suggestions?
> rename "Name" field or hide it completely from the user.
No way I know of. Name is a required field for document libraries. It's the column users click on to open a document or folder. If you look at the base Folder or Document content types Name is the one field that cannot be changed.
You could create a view that does not display the Name column, but users would not be able to click on anything unless you added some custom JavaScript or added your own Hyperlink columns.
Thanks, this is very useful information.
If I attach metadata to the folder will that metadata also be attached to all the documents contained in that folder?
Divya,
No, the metadata is only on the folder. A search for the meta data will find the folder, but not the documents.
Now in 2010... we now have Document Sets. Kind of like folders with shared metadata.
Mike
Hi Mike,
Thanks for the reply.
In my collaboration space I have Project folders that have project name metadata attached to it.
Now I want that all documents in that folder should have project name metadata attached to it automatically.
Is there a possibility to do that some how in SharePoint 2007?
Regards
Divya
Divya,
In 2007 you would need to create some custom code, either a workflow or event receiver, to sync the metadata between the folder and the files.
Mike
THis is perfect, just what I was looking for! Very clear instructions too. Many thanks
Very useful. Should note that you can (and should, I believe) turn off "Allow management of content types" after the new folder type is created.
WOOOOOOW,
straight forward to the point. very useful. Thank you
I looked everywhere trying to find this information. Thanks a bunch!
Nice post. It would be great if you could filter a document library on the meta data for the folder. Creating a view that uses the folder metadata to display the documents in the folder or use the content type of the folder to display it's contents.
I am using the enhanced folder in a list. I created columns specific to the enhanced folder in the site content type. I then created in the list a few columns specific to items, but they are showing thru to the enhanced folder columns when I click "edit item." Can I exclude them from the enhanced folder content type? Thanks!
Wow, 4 years later this is still a great tool. I'm so glad I found this!
I followed this step-by-step and it really works! This solves the problem of how can I create a view that returns folders.
Thanks for this - it's really helped me. But I have a problem. When I filter on my new column and then click on my folders - I can't see the content inside the folders.
When I'm not filter and click on the folder I see the content.....
Tobias,
That behavior does not suprise me. While a folder is treated like a container, it really is an "item" based on a special Content Type. When the filter is applied and the documents in the folder do not have that metadata then the documents are excluded from the filtered view when you expand the folder.
If you are using SP 2010 then take a look at Doc Sets and see if that will do what you need. At least for search purposes, items in a Doc Set inherit the properties of the Doc Set. Not sure about filters though.
Mike
Someone liked your blog post so much they recreated it themselves!
With your exact wording!
http://zoshaikh.wordpress.com/2011/11/30/add-column-to-folder-sharepoint-document-library/
http://zoshaikh.wordpress.com/2011/11/30/add-column-to-folder-sharepoint-document-library/
Someone liked your blog post so much they copy pasted it to their own!
> Someone liked your blog post so much they recreated it themselves!
Happens a lot, and there's little I can usually do about it.
Thanks for letting me know.
Mike
Mike, great use. I want to have a field that says what is supposed to go into each folder, and this feature is very useful. Now, I have often the same set of folders that I copy using "Actions", "Open with Windows Explorer". Then I can copy the folders from my template structure with standard Windows features. But then the description field does not come along. Do you know how I can avoid retyping the text each time I copy the structure?
Anonymous,
> I want to have a field that says what is supposed to go into each folder
The problem is that Windows Explore does not copy the Folder content type. It just creates a new folder. Have you tried using Document Sets? The setup steps are similar. After activating the Document Set feature you create a new content type that inherits from Document Set and then you add your custom columns. Unlike basic folders you can also add default content and configure and customize the "home page" of the document set.
If you are using SP 2010, you will find that Doc Sets do not permit folders as content. But, SP 2013 Doc Sets do allow folders.
Mike
Great post...I have veiws created to filter the folders..
When I see all items view, these are all folders but once I create a view, folders look like documents.No more folder icon to show its a folder, just looks like a doc.When u click on the Name , it does expand and show other items in the folder but at the view level u cannot differenciate a folder from an item but when u look at All Items view , I can see the folder Icon...Has anyone seen this behavior
YOU ROCK!!!
Thanks for making this so easy...
thanks Mike...i am looking to create a column within a folder in a library that is relevant only to that folder. But, I notice when I click on other folders in the library the column is "carried over" to these folders as well. Is there a way to create a column in a folder that exists only in that folder, and no others, within a library?
The major issue I have been encountering is that if this is saved as a document template and then subsequently re-created, the folder's associated metadata column's value does not retain its original value (within settings/default column settings).
Great stuff. Was able to create a "project folder" that includes a year column and it automatically adds the year and quarter.
Much appreciated.
Two thumbs up. I can't tell you how helpful this was and so perfectly laid out. Thank you.
Mike - I like it. The feature I like in a document set is that I can push the column information down to the document so I don't have to fill the information in every time I upload a file.
It doesn't seem to work here though. I'm guessing that I could probably populate it through SharePoint Designer.
Steve,
Property inheritance is one of the most interesting features of a Document Set. I suppose you could emulate that with a workflow. Simple folders don't support property inheritance.
Mike
now just how to do this in powershell across an entire SharePoint Site Collection. I have a few thousand document libraries to update.
This is really good.
Post a Comment