Hi All, I'm using Sharepoint 2007. Is there a way to CAML query documents (in this example with a ContentType of Invoice) that do not have any workflows assigned to them?
I realize I can pull back all of the Invoices using something like this:
SPQuery query = new SPQuery();
query.ViewAttributes = "Scope=\"RecursiveAll\"";
query.Query= @"<OrderBy>
<FieldRef Name=""Title"" />
</OrderBy>
<Where>
<Eq>
<FieldRef Name=""ContentType"" />
<Value Type=""Text"">Invoice</Value>
</Eq>
</Where>";
SPList list = web.GetList(url);
SPListItemCollection items = list.GetItems(query);
and then access each indivdual SPListItem Workflows collection, and check to see if the collection is null or has a count of 0.
However, I don't want to pull back 100,000+ invoices when I only need the 50 or so that don't have workflows.
So, I'm looking for a CAML query that allows me to get Invoices without workflows.
Thanks!
Dave