Why does custom content types allow the "required" column attribute to be overridden?

Unanswered Why does custom content types allow the "required" column attribute to be overridden?

  • Saturday, March 24, 2012 11:14 AM
     
     

    I don’t understand why custom content types allow the "required" attribute to be overridden and am hoping someone can explain the rationale. (I’m very familiar with how to do it, but I am trying to understand why I’d ever want to do it.) The reason I’m puzzled is that when a library is created that uses the custom content type, it auto-adds the columns that are in the custom content type, which is a good thing. But, it also sets the "required" setting to how it is defined at the column level, not the custom content type level. Which means that the setting as defined at the content type level appears never to come into play when creating libraries. Am I missing a purpose here, or is it one of those settings that doesn’t do anything of use?

    Obviously this is not an issue in a production envionment (I just ignore the option!), but I'm just curious really if there's something funky that I'm missing. :)

All Replies

  • Monday, March 26, 2012 3:55 AM
    Moderator
     
     

    "But, it also sets the "required" setting to how it is defined at the column level, not the custom content type level. Which means that the setting as defined at thecontent type level appears never to come into play when creating libraries. "

    My test result is just the opposite:

    1. i create site column which require information;

    2. create custom content type, add the site column into custom content type, this column in site content type is default to required, as set in the site column;

    3. i change the column to optional in the custom content type;

    4. add the custom content type into a document library, the custom column is also added, and it is optional, as set in the custom content type, instead of required as set in the site column.

    Could you please try install the latest update and test again in test environment?

  • Monday, March 26, 2012 6:45 AM
     
     
    Thanks for the reply. I'm running 14.0.6114.5000 (December CU) - I didn't notice that a new CU has just been released so I'll try that. The other thing I didn't mention that might be relevant is that I'm using content type publishing from a central hub site. I'll apply the latest CU and see if that resolves it.
  • Monday, March 26, 2012 7:10 PM
     
     

    I’ve applied the March CU and the problem is still there, so I’ve investigated further. It’s nothing to do with content type publishing because this time, I tested on the “root” site where the content type is defined. If I create a column and leave it as not required, then add it to a content type and make it required, and then create a library that uses this content type (and I delete the default Document type), the column reverts to not required. I have repeated this test 3 times, twice using a single line of text field and once using a managed metadata field and on all three occasions, I got the same result.

    Note that I start the other way round from your test. So, you created a column and made it required, but I created it and left it not required. So, can you test it again with the way I did it please?

    Many thanks

    EDIT: I just tested it again (4th time) to make sure I'm not going mad and the problem happened again.
  • Wednesday, March 28, 2012 7:49 AM
    Moderator
     
     
    is it just a typo? I only see Feb 2012 CU as latest update, no March CU: http://technet.microsoft.com/en-us/sharepoint/ff800847
  • Wednesday, March 28, 2012 8:20 AM
     
     

    http://support.microsoft.com/kb/2597150 with "March 7, 2012" in the title.

    Anyway, either way, it doesn't resolve the issue unfortunately.

  • Thursday, March 29, 2012 9:31 AM
     
     
    Just wondering if anyone's had a chance to try this little experiement out to see if it's a bug, or something in my envionment? As I mentioned, it's no showstopper, but it would made management of columns a little easier if it worked.
  • Friday, April 20, 2012 6:03 PM
     
     

    Tumbleweed....

  • Saturday, April 21, 2012 9:58 AM
     
     

    OK, in an attempt to add some sound to the deafening silence, here are my test results. As a test, I have created three columns that I have called customer, project and technology (and which are all associated with managed metadata) as follows:

    Column Settings:
    customer: not required, no default
    project: not required, no default
    technology: not required, no default

    Content Type Setting:
    customer: required
    project: required
    technology: required

    Library Setting:
    customer: not required, default to folder name
    project: not required, no default
    technology: not required, no default


    Now, when I add a new item to the library via IE:
    customer: not required, default to folder name (should be required as per content type)
    project: not required, default to one of the managed metadata values (should be required as per content type, should have no default)
    technology: required, default to one of the managed metadata values (should have no default)

    So, as far as I can see, none of the columns behaves correctly. After weeks of testing SharePoint as a document management system, I'm coming to the unfortunate conclusion that SharePoint is still far too flakey and unpredictable to be used in a large corporate envionment. :( If it behaved consistently wrong, I could design around that, but it's the fact that it seems to have a mind of its own sometimes that makes it so hard to work with.

  • Friday, May 04, 2012 6:38 PM
     
     

    Well, whilst I'm here talking to myself, I might as well point out that, having applied the April update, the bug still exists. :(

    To repeat: create an optional column; create a content type that has this column and make it mandatory; create a library that uses the content type. The column in the library is optional but it should be mandatory. Doing it the other way round (with a mandatory column but optional in the content type) works fine.

  • Wednesday, November 21, 2012 6:44 PM
     
     

    I am experiencing the same inconsisten behavior in our farm. Were you ever able to get this resolved?

    Dean


    Dean MCTS-SQL 2005 Business Intelligence, SharePoint 2010, Configuration

  • Thursday, November 22, 2012 3:04 AM
    Moderator
     
     

    i just tested with an optional site column, added to site content type, make it required in site content type, add the site content type into a document library. The resulting list content type in the library has the column as required, as defined in the site content type, while as opposite to the site column.

    That is to say, i still cannot reproduce what you describe. When you talk about column and content type, could you please make it clear whether it is a site column or list column, a site content type or a list content type.

  • Monday, November 26, 2012 1:49 PM
     
     

    Just tried it 2 minutes ago in a 14.0.6126.5000 envionment. Still not working.

    @GuYuming, I suspect you're still doing it the other way round like you described in March this year.

    1. Create a new site column as Optional.

    2. Create a new content type and add the new column to it.

    3. In the new content type, make the column Required.

    4. Create a new library.

    5. Add the new content type to the library and remove the default content type.

    6. The new column is marked as Optional, not Mandatory like it should be.

    TBH, I have given up waiting for a fix from MS. Instead, we have just changed our library provisioning documentation to work around it.

  • Wednesday, November 28, 2012 1:09 PM
     
     

    In our scenario, we have a Content type hub. A Choice column was created in this Hub and it was set to Required. A Content Type was created that used this column, in the CT, the column is displayed as Required. The CT was published.

    In a site that subscribes to the Hub, the Site Settings page shows the CT with the site column correctly defined as Required. A document library was added to a subsite, and the CT added to the library. However, the site column in this document library shows up as OPTIONAL.

    This same problem has happened with several Choice Type columns in several content types.

    We have build 14.0.6123.5000

    Dean


    Dean MCTS-SQL 2005 Business Intelligence, SharePoint 2010, Configuration

  • Friday, November 30, 2012 12:33 PM
     
     

    Dean, thanks for adding weight to the issue: it is clearly still an issue. All we need now is for MS to acknowledge it. :) (Not holding my breath on that happening because there's a workaround, so even if they do acknowledge it, it'll probably be way down the list.)