I have a document library list. Lots files, and a handful of file types. I know how to force a filter via the URL. Saw docx file. But right now, I have a need to show all files except docx, pptx, xlsx. So things like pdfs, rar, zips, etc... should show.

Any thoughts on this kind of filter and how to accomplish it? Right now, I have a crazy javascript planned out, but feel it's too messy.

1 Answer 1


Using following CAML Where clause

         <Neq><FieldRef Name="DocIcon"/><Value Type="Computed">docx</Value></Neq>
         <Neq><FieldRef Name="DocIcon"/><Value Type="Computed">pptx</Value></Neq>
      <Neq><FieldRef Name="DocIcon"/><Value Type="Computed">xlsx</Value></Neq>

file types docx, pptx and xslx will be excluded. DocIcon column (Display Name Type) is used to determine file type.

The same List View filter configured in View settings page is shown below

enter image description here

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.