Modern teamsite - documents being uploaded not being assigned default content type

%3CLINGO-SUB%20id%3D%22lingo-sub-181673%22%20slang%3D%22en-US%22%3EModern%20teamsite%20-%20documents%20being%20uploaded%20not%20being%20assigned%20default%20content%20type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-181673%22%20slang%3D%22en-US%22%3E%3CP%3EWithin%20one%20of%20our%20modern%20teamsites%20we%20have%20a%20document%20library%20with%20custom%20content%20types%2C%20one%20of%20which%20we%20have%20made%20default%20for%20the%20library.%3C%2FP%3E%3CP%3EWhen%20uploading%20certian%20word%20files%20from%20our%20share%20drives%20these%20do%20not%20get%20assigned%20the%20default%20content%20type%2C%20but%20another.%3C%2FP%3E%3CP%3EJust%20to%20note%20that%20these%20documents%20where%20created%20outside%20of%20sharepoint%20so%20they%20would%20not%20have%20the%20other%20custom%20content%20type%20attached%20to%20them%20in%20anyway.%3C%2FP%3E%3CP%3EAny%20ideas%3F%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-181673%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-184809%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20teamsite%20-%20documents%20being%20uploaded%20not%20being%20assigned%20default%20content%20type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-184809%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Damien%20one%20way%20we%20have%20worked%20around%20this%20is%20to%20have%20different%20libraries%20for%20different%20content%20type%20uploads%20and%20then%20workflows%20to%20copy%20or%20move%20those%20files%20to%20the%20library%20you%20really%20want%20them%20at.%26nbsp%3B%20To%20setup%3A%3C%2FP%3E%3COL%3E%3CLI%3ECreate%20a%20new%20library%20for%20each%20content%20type%20and%20clearly%20label%20the%20library%20from%20a%20business%20perspective.%3C%2FLI%3E%3CLI%3EAdd%20the%20content%20type%20to%20the%20new%20library.%3C%2FLI%3E%3CLI%3EDelete%20any%20other%20content%20type%20from%20the%20new%20library%20so%20it%20is%20only%20the%20preferred%20content%20type.%3C%2FLI%3E%3CLI%3EAdd%20a%20workflow%20to%20copy%20or%20copy%2Fdelete%2C%20the%20later%20is%20usually%20best%20so%20no%20duplication%20of%20files%20especially%20from%20a%20search%20perspective%2C%20from%20the%20%22dropbox%22%20to%20the%20library%20you%20really%20want%20the%20files%20in.%3C%2FLI%3E%3CLI%3ESetup%20a%20menu%20or%20page%20that%20directs%20users%20to%20the%20dropboxes%20so%20they%20have%20an%20easy%20method%20of%20getting%20the%20files%20to%20the%20right%20spots.%3C%2FLI%3E%3C%2FOL%3E%3CP%3EAny%20questions%20let%20me%20know%20or%20feel%20free%20to%20reach%20out%20to%20my%20company%20that%20specializes%20in%20these%20things.%26nbsp%3B%20%3CA%20title%3D%22eSoftware%20Associates%22%20href%3D%22https%3A%2F%2Fwww.eswcompany.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.eswcompany.com%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-184792%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20teamsite%20-%20documents%20being%20uploaded%20not%20being%20assigned%20default%20content%20type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-184792%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F4831%22%20target%3D%22_blank%22%3E%40Paul%20de%20Jong%3C%2FA%3E%26nbsp%3BI%20have%20tried%20your%20suggestion%20but%20with%20mixed%20results.%20Some%20documents%20if%20I%20upload%20get%20the%20default%20CT%20(the%201st%20one)%20others%20get%20a%20different%20one.%20Also%2C%20if%20I%20copy%20a%20group%20of%20documents%20from%20another%20SP%20site%20(with%20no%20custom%20CT's)%20to%20the%20library%20with%20my%20custom%20CT's%20it%20does%20not%20apply%20the%20default%20CT.%20Strange%20indeed.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-183642%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20teamsite%20-%20documents%20being%20uploaded%20not%20being%20assigned%20default%20content%20type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-183642%22%20slang%3D%22en-US%22%3E%3CP%3EInteresting.%20In%20my%20SharePoint%20Online%20environment%20with%20multiple%20document%20and%20folder%20CTs%20I%20observe%20the%20following%20behaviour.%3CBR%20%2F%3E-%20if%20the%20default%20CT%20(%3D%20the%20first%20CT)%20is%20a%20document%20CT%20then%20Drag-and-drop%20will%20associate%20that%20CT%20with%20the%20new%20document.%3CBR%20%2F%3E-%20if%20the%20default%20CT%20is%20a%20folder%20CT%20(e.g.%20document%20set)%20the%20document%20after%20drag-and-drop%20is%20associated%20with%20the%201st%20document%20CT%20in%20the%20CT%20list.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EErgo%2C%20you%20are%20able%20to%20set%20a%20default%20CT%20for%20documents.%20Simply%20make%20sure%20it%20is%20the%20first%20%22document%22%20CT%20in%20the%20CT%20list.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-183571%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20teamsite%20-%20documents%20being%20uploaded%20not%20being%20assigned%20default%20content%20type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-183571%22%20slang%3D%22en-US%22%3E%3CP%3EGood%20question%2C%20would%20need%20to%20test%20this%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-183558%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20teamsite%20-%20documents%20being%20uploaded%20not%20being%20assigned%20default%20content%20type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-183558%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20all.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20when%20uploading%2Fcopying%20to%20a%20library%20with%20multiple%20content%20types%20does%20SP%20assign%20a%20CT%20at%20random%20each%20time%3F%20or%20is%20there%20some%20logic.%20Cheers%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-183550%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20teamsite%20-%20documents%20being%20uploaded%20not%20being%20assigned%20default%20content%20type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-183550%22%20slang%3D%22en-US%22%3E%3CP%3ENot%20as%20far%20as%20I%20know.%20You%20*might*%20be%20able%20to%20do%20it%20with%20a%20Flow%20but%20it's%20been%20a%20while%20since%20I%20looked%20at%20Flow%20capabilities.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-183539%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20teamsite%20-%20documents%20being%20uploaded%20not%20being%20assigned%20default%20content%20type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-183539%22%20slang%3D%22en-US%22%3E%3CP%3EAFAIK%2C%20this%20is%20not%20possible%20OOTB%20.%3CBR%20%2F%3E%3CBR%20%2F%3EAn%20alternative%20way%20to%20upload%20items%20with%20a%20specific%20Content%20Type%20is%20to%20use%203rd%20party%20tools.%20They%20allow%20selection%20of%20Content%20Types%2C%20assigning%20default%20metadata%20values%2C%20retain%20original%20modification%20date%20of%20documents%2C%20...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPaul%20%7C%20SLIM%20Applications%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-183518%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20teamsite%20-%20documents%20being%20uploaded%20not%20being%20assigned%20default%20content%20type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-183518%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F3119%22%20target%3D%22_blank%22%3E%40Ian%20Moran%3C%2FA%3E%26nbsp%3BThanks%20for%20the%20clarification.%20So%20apart%20from%20scripting%20is%20there%26nbsp%3Banyway%20to%20assign%20a%20default%20content%20type%20to%20a%20library%20when%20files%20and%20uploaded%2Fcopied%3F%20Cheers%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-181849%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20teamsite%20-%20documents%20being%20uploaded%20not%20being%20assigned%20default%20content%20type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-181849%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20doesn't%20work%20like%20that.%20Setting%20the%20Default%20Content%20type%20for%20a%20library%20simply%20means%20that%20when%20clicking%20the%20New%20menu%20option%20in%20the%20library%20you%20will%20create%20a%20document%20using%20that%20content%20type%20-%20without%20needing%20to%20choose%20it%20from%20the%20dropdown%20(you%20might%20have%20defined%20multiple%20content%20types%20for%20the%20library.%20Also%20this%20applies%20to%20a%20classic%20library%20where%20you%20choose%20New%20from%20the%20ribbon%2C%20in%20a%20modern%20library%20clicking%20New%20simply%20activates%20the%20dropdown)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUploading%20a%20document%20will%20not%20assign%20your%20default%20content%20type%2C%20it's%20there%20for%20file%20creation%20only.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-ie%2Farticle%2Fadd-a-content-type-to-a-list-or-library-917366ae-f7a2-47ad-87a5-9689a1884e60%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-ie%2Farticle%2Fadd-a-content-type-to-a-list-or-library-917366ae-f7a2-47ad-87a5-9689a1884e60%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-896115%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20teamsite%20-%20documents%20being%20uploaded%20not%20being%20assigned%20default%20content%20type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-896115%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F3119%22%20target%3D%22_blank%22%3E%40Ian%20Moran%3C%2FA%3E%26nbsp%3B%20I%20beg%20to%20differ.%20Uploading%20documents%20to%20a%20document%20library%20will%20apply%20the%20default%20content%20type%20to%20the%20uploaded%20documents.%20The%20default%20content%20type%20is%20NOT%20just%20for%20the%20GUI%20New%20button.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Frequent Contributor

Within one of our modern teamsites we have a document library with custom content types, one of which we have made default for the library.

When uploading certian word files from our share drives these do not get assigned the default content type, but another.

Just to note that these documents where created outside of sharepoint so they would not have the other custom content type attached to them in anyway.

Any ideas?

Cheers

10 Replies

It doesn't work like that. Setting the Default Content type for a library simply means that when clicking the New menu option in the library you will create a document using that content type - without needing to choose it from the dropdown (you might have defined multiple content types for the library. Also this applies to a classic library where you choose New from the ribbon, in a modern library clicking New simply activates the dropdown)

 

Uploading a document will not assign your default content type, it's there for file creation only.

 

https://support.office.com/en-ie/article/add-a-content-type-to-a-list-or-library-917366ae-f7a2-47ad-...

 

@Ian Moran Thanks for the clarification. So apart from scripting is there anyway to assign a default content type to a library when files and uploaded/copied? Cheers

AFAIK, this is not possible OOTB .

An alternative way to upload items with a specific Content Type is to use 3rd party tools. They allow selection of Content Types, assigning default metadata values, retain original modification date of documents, ...

 

Paul | SLIM Applications

Not as far as I know. You *might* be able to do it with a Flow but it's been a while since I looked at Flow capabilities.

Thanks all.

 

So when uploading/copying to a library with multiple content types does SP assign a CT at random each time? or is there some logic. Cheers

Good question, would need to test this

Interesting. In my SharePoint Online environment with multiple document and folder CTs I observe the following behaviour.
- if the default CT (= the first CT) is a document CT then Drag-and-drop will associate that CT with the new document.
- if the default CT is a folder CT (e.g. document set) the document after drag-and-drop is associated with the 1st document CT in the CT list.

 

Ergo, you are able to set a default CT for documents. Simply make sure it is the first "document" CT in the CT list.

@Paul de Jong I have tried your suggestion but with mixed results. Some documents if I upload get the default CT (the 1st one) others get a different one. Also, if I copy a group of documents from another SP site (with no custom CT's) to the library with my custom CT's it does not apply the default CT. Strange indeed.

Hi Damien one way we have worked around this is to have different libraries for different content type uploads and then workflows to copy or move those files to the library you really want them at.  To setup:

  1. Create a new library for each content type and clearly label the library from a business perspective.
  2. Add the content type to the new library.
  3. Delete any other content type from the new library so it is only the preferred content type.
  4. Add a workflow to copy or copy/delete, the later is usually best so no duplication of files especially from a search perspective, from the "dropbox" to the library you really want the files in.
  5. Setup a menu or page that directs users to the dropboxes so they have an easy method of getting the files to the right spots.

Any questions let me know or feel free to reach out to my company that specializes in these things.  https://www.eswcompany.com

@Ian Moran  I beg to differ. Uploading documents to a document library will apply the default content type to the uploaded documents. The default content type is NOT just for the GUI New button.