4

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.

5

Using following CAML Where clause

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

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, privacy policy and cookie policy

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