Forum Discussion

MarBis's avatar
MarBis
Copper Contributor
Jul 11, 2019
Solved

Multiple content types in a library causes metadata problems on upload

I defined Document Set content type “A” (Engineering) to contain custom site metadata (for simplicity, call them 1, 2 and 3). I defined Document Set content type “B” (Energy Services) to contain custom site metadata (call them 4, 5 and 6). My custom metadata uses "lib." prefix for clarity

 

I created a document library and configured it to include instances of A and B along with default content types Document, Image, Video and a couple more.

 

 

When I am in Document Set A and upload a document, the metadata assignment screen shows me 1-3 as I expect, but it also shows 4-6 which do not apply to A:

 

Likewise, when I am in B and upload a document, the assignment screen shows me 1-3 (which I do not want) along with 4-6.

 

I cannot figure out how to restrict the metadata entry screen to just those columns defined within the content type.

If it’s relevant, I had another issue to solve: As shown in the Library Settings window, the default content types were not automatically “Used in” the document sets created from A and B even though I included the default types within A and B. As such, 1-6 were not appearing in the metadata assignment screen upon upload. So, in Library Settings I selected a default type (eg, “Document”) and manually added my custom site metadata 1-6 and that cured the issue. I don’t think it’s related to my existing issue, but thought I would mention it just in case.

It’s easy to get lost in the language...I hope this made sense.

Any suggestions?

  • MarBisso you've started adding all your custom metadata columns to both your Document Set content types. Ultimately however you are adding Documents (items with Content Type "Document") to your document set. Documents have their own content type (Document instead of Document Set) which will need your columns too. Hence, adding your metadata columns to the Document content type made the columns appear in your forms. 

     

    Basically you'll need to define another 2 different Content Types based on "Document" to get the behavior you want (e.g. "Engineering Document" and "Energy Services Document"). You can then add the columns required for each type of document to the Content Type. Next, you'd probably want to configure Document Set Settings to allow only the matching Document Content Type. Your Document Library should be configured with the 4 Content Types you end up with:

     

    1. Engineering Document Set
    2. Engineering Document
    3. Energy Services Document Set
    4. Energy Services Document

    Hope this helps!

     

     

     

5 Replies

  • paulpascha's avatar
    paulpascha
    Bronze Contributor

    MarBisso you've started adding all your custom metadata columns to both your Document Set content types. Ultimately however you are adding Documents (items with Content Type "Document") to your document set. Documents have their own content type (Document instead of Document Set) which will need your columns too. Hence, adding your metadata columns to the Document content type made the columns appear in your forms. 

     

    Basically you'll need to define another 2 different Content Types based on "Document" to get the behavior you want (e.g. "Engineering Document" and "Energy Services Document"). You can then add the columns required for each type of document to the Content Type. Next, you'd probably want to configure Document Set Settings to allow only the matching Document Content Type. Your Document Library should be configured with the 4 Content Types you end up with:

     

    1. Engineering Document Set
    2. Engineering Document
    3. Energy Services Document Set
    4. Energy Services Document

    Hope this helps!

     

     

     

    • MarBis's avatar
      MarBis
      Copper Contributor

      paulpaschaIt worked!

      I had a minor hiccup when attempting to delete the generic document content type from the Document Set until I tracked down that "document" was in use by the default content option even though no default content was specified. That battle won, everything else was spot on. Many thanks.

    • MarBis's avatar
      MarBis
      Copper Contributor

      paulpascha 

      Thanks for pointing me in the right direction. Once I add the columns to the two "Document" content types, do I then remove the corresponding columns from the Document Set content types (ie, in Engineering Document but not Engineering Document Set)? I want to avoid any confusing duplication.
      • paulpascha's avatar
        paulpascha
        Bronze Contributor

        MarBis this depends on your requirements. You could put them on the Document Set Content Types as well and configure the columns as so called "Shared Colums" to automatically push the values from the Document Set down to the documents within