I have a library with a few folders in it, and the files in the folder have a "Status" property and an "Assigned To" field.

I want to make a view with the following logic:

If (Content Type == Folder) OR ((Status == "Blah") AND (Blah Status Assigned To == [Me]))

so that when I email a link to the pre-filtered library, the user can see the folders in the root of the library, but also only see the files he's assigned.

I've tried setting up the view's filters as "Assigned To" AND "Status" OR "Content Type", as well as the other way around to try and work with SP's order of operations, but neither seems to work.

Basically I want a View to show files of a given criteria, AND all folders. Is what I'm trying to do possible just using the basic filters?

  • Are all of the items you want to show at the root level? If so, you could do this, if not, the act of specifying recursive item search means you won't get any folders.
    – Servy
    Commented Jun 4, 2012 at 19:41
  • Also, when you say, "doesn't work" you should say both what you expect to happen (you have here) and what does happen (which you haven't done here). Is it just not showing folders, not showing any items, not showing the right items, is it giving you an error message at any point, etc.
    – Servy
    Commented Jun 4, 2012 at 19:43
  • Sorry, it was showing the folders, but when I went into the folders it wasn't showing any files.
    – Sean D
    Commented Jun 6, 2012 at 15:54

1 Answer 1


SharePoint CAML queries work in pairs when it comes to filtering and I am fairly certain that the out of the box list view filters work in the same way and are probably CAML behind the scenes. When working with the pairings, I believe SharePoint always groups the top most items first.

Using your example I was able to get what I thought was the expected result using

Assigned To = [Me] AND Status = Blah OR ContentType = Folder

because it naturally combines the first two.

If you are comfortable reading XML / CAML I would check out U2U Caml Query Builder and see how it orders things which should hopefully help you understand how it is all working behind the scenes so that you can get a better handle on out of the box filtering when it comes to larger and more complex filters.

Let me know if you are not seeing what you expect with that and if so, please explain in more detail what you are seeing that you aren't expecting.

  • As a side note, I tested my above filter in SharePoint 2010 - I wouldn't expect it to make a difference though. Commented Jun 4, 2012 at 19:44
  • 1
    I also tried and got the wanted result by "Assigned to" AND "Status" OR "Content Type". You can open the site => list => view in SharePoint designer and look at the <Where> clause Commented Jun 4, 2012 at 20:01

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.