1

I am new to sharepoint , and I have an issue with content type.

I have 2 content types ( content type1 and content type2) created for my library1, library1 has 2 folder: folder1 and folder2. I have assigned content type1 and content type2 to Library1 by allowing management of contnet type in that labrary1 and added those 2 content type form to the library.

Normally i want contenttype1 to be assign to folder1 and contenttype2 to be assign to folder2. such that the columns of contenttype1 are asked to be filled when a document is adding into folder1 and columns of contenttype2 are asked when adding a new document in folder2.

What I did is : - I right click on the folder1 and select the change new button order , and I uncheck visible on the content type2, and kept content type1 and yes the content type1 was assign to the folder1,

 - when I do the same on folder 2 I got an error: "List data validation failed" 

Am I doing something wrong? Can I do this with out of the box feature like I think, How can I assign different content types to 2 differents folder in the same library ?

Thanks for your answer.

1

The available content types are configured at the library level, and can't be configured differently for different folder in the same library.

The easiest and best way to achieve the result you want is to use multiple libraries, you can then configure the content types for each library as needed.

If you have the possibility of using server side code, you could write an event receiver and attach it to the ItemAdding event in the library, in the code you would then check which folder the document is being added to and set the appropriate content type before the edit form is displayed. But that is obviously a lot more complex than just using multiple libraries.

  • Although a good idea in principle, I wouldn't recommend it. This is one of those kind of "hacks" that becomes a nightmare to unravel for those that tread after you. – Michael A Jul 6 '15 at 22:45
  • 1
    That's a very good point. These type of hacks are difficult to support unless they are very well documented and there's appropriate processes in place to maintain them. – Steven Mulkerrins Jul 7 '15 at 10:48
  • Thank you all for your answer, I don't have access to the server side code,so the multiples library will be my option for now. – user3795868 Jul 7 '15 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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