Salvete! I have a forms-library with two content-types that appear in the "New Document" menu. How can I create a view and choose which content-type to use?

Let me explain. I have two content-types: "custom" and "form". "Form" only shows the filename. "Custom" shows fields from inside the form.

Now, I want "custom view" to work just for the "custom" content-type, and "form" to just work for the "form" content-type.

Is there a way to specify which content-type is used by each view?

  • Are you talking about the forms of the list that are displayed when you view list item, create list item, or modify list item?
    – Jussi Palo
    Nov 23, 2012 at 8:04
  • Yes. I can choose between two "new" items. I want to be able to create a view for one form and another view for the other form.
    – bgmCoder
    Nov 23, 2012 at 14:30

1 Answer 1



i’m assuming you are talking about Data Views in SP designer 2010. there seams to be a few solutions out there, one creating a SOAP service, which is painful. i have also created a view in the browser, filtered by content type – then edited the view in SP designer – this then pre-populates the filter with the “contentType” field name – BUT if you make any changes to the view (or delete the wrong one) your in trouble… the other option that has worked for me is to use sharepoint designer to insert a data view on your document library, add a filter (any will be fine. then look at the code for data view, and you should see the “query” tags.

<Query> <Where> <Eq> <FieldRef Name=”FieldName”/> <Value Type=”Computed”>MyVal</Value> </Eq> </Where>

replace FieldName with “ContentType” and the content type will appear in the filter. it’s a bit of a hack – but seams to have the least side effects for me.

SOURCE: SharePoint Group by or Filter by Content Type, see the first comment!

  • No, I haven't used SP Designer for any of this, yet. That solution is "hacky" - that is, I would have to remember that it was done, and how to do it again should I edit the views, no? It would be easy for someone to mess it up. Interesting approach however.
    – bgmCoder
    Nov 22, 2012 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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