Revision #1

You are currently reviewing an older revision of this page.
Go to current version
Recently i was working on site content type and site columns. I have found one big problem in that. I had created around 20 site columns and 6 site content types. I put some default value in some of columns and added in content type. Now i enable the content type on library and added all the content types. Now when i upload the any file through site or programmatically, my default value is not coming in site column. I have done lot of R&D and spent around 2 hours to find out the problem but no success.

Finally I got the answer.

There are two ways to get the default value in a column:

1. If we set our custom content type as default content type then we can get the default value in column otherwise field will be blanked.

2. For the second way, if there are multiple content types (as in my case), then we have to add this site column with all the content type and set any of content type as default content type on library.

Hope it could help someone else!