Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I need to add a new column to an existing Content Type in Sharepoint 2010. This column requires a default value. How do I apply the new column to the existing Content Type, and apply the default value to all existing list items that use the Content Type? Thx, Barry

share|improve this question

2 Answers 2

You would need to create the site column, and the default value, then you need to touch all existing items in the content type to update them.

The code to update items in powershell is here I sourced that for you, I'm not sure if you would have to set it or just update it, if you edit the content type and save it will add the default value, I am not sure about with powershell, but anyway you might as well set it in the script.

share|improve this answer

If you don't have many records in your list/doclib (I mean, less than several hundred), then my suggestion is to do this in two steps which could avoid writing code:

  1. Add a site column to an existing content type Go to: Site Settings-->Site content types-->Select/create the content type-->Add new column.
  2. Apply the default value to existing records Go to: List Tools (or Document Tools) --> List --> Datasheet View --> type in the default value for your first records, click the little black dot on the right bottom of the cell and hold & drag with your mouse to apply the value to all the rest records.

done.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.