locked
Field values are not erased when I change content types. RRS feed

  • Question

  • On an SP2010 site I created 2 Site Columns  TextColumn1 and  TextColumn2 (both Single Line of text).

    I added Two Content Types ContentType1 and ContentType2 (both derived from Item).

    I created a list and enabled content types. I Added ContentType1 and ContentType2 to the list.

    I configured the devfault view to show TextColumn1 and  TextColumn2.

    I added an Item of ContentType1 and for TextColumn1  added the value 'c1'

    I edited the item and changed the content Type to ContentType2 and entered a value of c2 for TextColumn2.

    The default view still shows the value of 'c1' for TextColumn1 even though the item is of content type ContentType2 which does not have this field defined.

    How do I correct this?

    Tuesday, August 12, 2014 3:58 PM

Answers

  • When the content types are in the same list then the list has both columns available for use in items. The process for changing content types doesn't blank fields by default.
    • Marked as answer by Victoria Xia Wednesday, August 20, 2014 7:57 AM
    Tuesday, August 12, 2014 8:04 PM

All replies

  • If I'm understanding your question correctly, this is expected behavior. The item still has both the content types applied to it. The columns are included in the view. So Any values in those columns for that item will be displayed.

    You could create views for each content type.

    You could also look into changing the default content type.

    Not sure if this helps because I'm not sure I understood the problem.

    Tuesday, August 12, 2014 5:38 PM
  • When I change the listItem to be contenttype2, the listitem no longer has a property called TextColumn1. I would have expected TextColumn1  to appear blank in the listview for this listitem  because the listitem has no propery called TextColumn1 .

    If I view the item in sharepoint manager, its shows no property called TextColumn1 .

    • Edited by Gover Tuesday, August 12, 2014 6:57 PM
    Tuesday, August 12, 2014 6:55 PM
  • When the content types are in the same list then the list has both columns available for use in items. The process for changing content types doesn't blank fields by default.
    • Marked as answer by Victoria Xia Wednesday, August 20, 2014 7:57 AM
    Tuesday, August 12, 2014 8:04 PM