My task was to find all records (files) from a document library with error conditions. Ideally, I'd love to access "Missing Info," a column in the System View "Files that need attention." Given that I can't, I decided to query each field with a null value.
For my purposes, it doesn't matter whether I use "Get Items" or "Get file (properties only)" since I'm just reporting and emailing. The Odata query is the same.
All conditions need to look for FSObjType='0' for Files. (Folders aren't relevant to my query--they have null values in these fields.)
So my first tries at Query Strings look like this:
((FSObjType eq '0') and (CourseTitle eq null)) or ((FSObjType eq '0') and (FiscalYear eq null)) or ((FSObjType eq '0') and (EndDate eq null)) or ((FSObjType eq '0') and (StartDate eq null)) or ((FSObjType eq '0') and (CPE eq null)) or ((FSObjType eq '0') and (GovCPE eq null))
The problem is that I only get two results.
If I look at just CourseTitle being null, I get the results matching the entries in "Files that need attention." This query makes sense because when the user uploads a document and doesn't enter the required fields, the CourseTitle and other fields are also null.
((FSObjType eq '0') and (CourseTitle eq null))
My question is, why does the query start limiting on other "or" conditions.
Also, the editor is not helpful on complex conditions.