Answered by:
Description Field in DocumentLibrary

Question
-
HI,
I can see a description field when I access sharepoint server using the IE. But When I looked into the fields of document library I could not find any field with Title or Name as Description. Which field is used for description of the file or How Can I see the description of a a file or folder in document library.
There is a field for PictureLibrary with the name Description though.
- Moved by Mike Walsh FIN Friday, April 2, 2010 12:52 PM not programming (From:SharePoint - Development and Programming (pre-SharePoint 2010))
Friday, April 2, 2010 10:58 AM
Answers
-
adobepankaj,
can you clarify your phrase: " I can see a description field when I access sharepoint server using the IE". You mean that there is Description field in some Picture library? Because OTB template for document libraries doesn't contain neither Description nor Comments fields. It contains Name and Title fields (of course if you didn't customize OTB doclib schema). You can check by creating test doclib: Site Actions > View All Site content > Create > Document library.
But you are right - in Pictures library there is Description field. And as I said above - this is exactly Comments fields (just with display name = Description instead of Comments). You can check it in 12/Templates/Features/PictureLibrary/PicLib/schema.xml. It contains the following field:
<Field Type="Note" Name="Description" ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}" ShowInNewForm="FALSE" ShowInFileDlg="FALSE" DisplayName="$Resources:core,Description;" Sealed="TRUE" Sortable="FALSE" Description="$Resources:core,piclibPicDesc;" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Description">
As you can see it has the sane ID as Comments field. So in order to add Comments field in doclib you need to perform the following steps:
1. Go to doclib > Settings
2. Add from existing site columns
3. Select Comments field and click Ok
Now you will have Comments field in your doclib. If you need rename it to Description - then select Comments column in doclib settings and change column name from Comments -> Description. After that you will have Description field in your doclib
Blog - http://sadomovalex.blogspot.com
Codeplex - http://camlex.codeplex.com- Proposed as answer by SharePointDrivesMeCrazy Thursday, April 8, 2010 4:54 PM
- Marked as answer by Lambert Qin [秦磊] Wednesday, April 14, 2010 11:17 AM
Tuesday, April 6, 2010 8:04 AM
All replies
-
hello
field "Comments" is often used as Description field in Sharepoint:
<FieldRef ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}" Name="Comments" DisplayName="$Resources:core,Description;" Required="FALSE"/>
E.g. for publishing pages exactly "Comments" is used as Description:
<ContentType ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2" Name="$Resources:cmscore,contenttype_systempage_name;"> <FieldRefs> <FieldRef ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}" Name="Comments" DisplayName="$Resources:cmscore,column_description_displayname;"/> ... </FieldRefs> </ContentType>
Blog - http://sadomovalex.blogspot.com
Codeplex - http://camlex.codeplex.com- Edited by sadomovalexMVP Friday, April 2, 2010 11:36 AM spelling
Friday, April 2, 2010 11:36 AM -
there are only two comment field for document library i,e ModerationComments, and CheckinComment.
Please tell me how can I get the description of a file or folder in document library.
Monday, April 5, 2010 2:53 PM -
adobepankaj,
can you clarify your phrase: " I can see a description field when I access sharepoint server using the IE". You mean that there is Description field in some Picture library? Because OTB template for document libraries doesn't contain neither Description nor Comments fields. It contains Name and Title fields (of course if you didn't customize OTB doclib schema). You can check by creating test doclib: Site Actions > View All Site content > Create > Document library.
But you are right - in Pictures library there is Description field. And as I said above - this is exactly Comments fields (just with display name = Description instead of Comments). You can check it in 12/Templates/Features/PictureLibrary/PicLib/schema.xml. It contains the following field:
<Field Type="Note" Name="Description" ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}" ShowInNewForm="FALSE" ShowInFileDlg="FALSE" DisplayName="$Resources:core,Description;" Sealed="TRUE" Sortable="FALSE" Description="$Resources:core,piclibPicDesc;" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Description">
As you can see it has the sane ID as Comments field. So in order to add Comments field in doclib you need to perform the following steps:
1. Go to doclib > Settings
2. Add from existing site columns
3. Select Comments field and click Ok
Now you will have Comments field in your doclib. If you need rename it to Description - then select Comments column in doclib settings and change column name from Comments -> Description. After that you will have Description field in your doclib
Blog - http://sadomovalex.blogspot.com
Codeplex - http://camlex.codeplex.com- Proposed as answer by SharePointDrivesMeCrazy Thursday, April 8, 2010 4:54 PM
- Marked as answer by Lambert Qin [秦磊] Wednesday, April 14, 2010 11:17 AM
Tuesday, April 6, 2010 8:04 AM