I'm using a CQWP, and I need to add more than three filters. The filters I want are:
- Status is not equal to Completed
- Status is not equal to Deferred
- Due date is less than Today
- Assigned To is equal to Me
The filter Assigned To = [Me] in my CAML query, but it's not returning any results. All my other filters work so far. Here is my code:
<property name="QueryOverride" type="string"> <![CDATA[ <Where> <And> <And> <And> <Neq><FieldRef Name="Status" /><Value Type="Choice">Completed</Value></Neq> <Neq><FieldRef Name="Status" /><Value Type="Choice">Deferred</Value></Neq> </And> <Lt><FieldRef Name="DueDate" /><Value Type="DateTime"><Today /></Value></Lt> </And> <Eq><FieldRef Name="AssignedTo" /><Value Type="Integer"><UserID Type="Integer" /></Value></Eq> </And> </Where> ]]> </property>
I have tested all my other filters, and they work. It's just the Assigned To that's not working. I have also tried removing all the carriage returns, but that did not help.
My Assigned To column is the default out-of-the-box Assigned To column when you create a Task list. It is showing Name (with presence), if that makes any difference.