I'm trying to come up with the best filter for auto retention to be set with. What will be the best way to auto apply retention on a SharePoint site to not include non end user working data? stuff like site assets or style library files.
I'm trying to just target documents, files within working libraries and list items which may include attachments.
I've tried this syntax: IsDocument:1 AND (ContentType:'Document' OR ContentType:'Item') AND -FileType:aspx
obviously this does not return list item since it's failing on the IsDocument clause. However, if I omit the IsDocument part and have it like so: (ContentType:'Document' OR ContentType:'Item') AND -FileType:aspx
This returns "non working" files as well such as items in site assets or style library which can be different file types. This is happening because the contenttype is set to document by default on these backend libraries.
Which brings me back to, how can I set auto applied retention to library documents, library files, list items. Do I have to create two separate labels in order to achieve my requirement?