Environment: SP2010 Enterprise SP1, Server/SQL 2008 R2, VS2012
When building alerts through object model, what is the longest or most complex CAML filter that can be applied to them? Can they be as complex as I want, or is there a set number or other practical limit (like performance impact) that restricts them?
For example, this is a valid filter that specifies a certain folder and all its sub-folders:
@"<Query>" +
@"<Or>" +
@"<Eq>" +
@"<FieldRef Name='ItemFullUrl'/>" +
@"<Value Type='string'>" + fullPath + @"</Value>" + //Everything in the folder
@"</Eq>" +
@"<BeginsWith>" +
@"<FieldRef Name='ItemFullUrl'/>" +
@"<Value Type='string'>" + fullPath + @"/</Value>" + //Everything in sub-folders
@"</BeginsWith>" +
@"</Or>" +
@"</Query>";
But what if I strung a dozen of those together with <Or> statements to make it cover multiple directories?
Edit: Bonus question, how deep can you nest something in the filter? The GUI never lets you go down more than one level (<And><Or></Or></And>) but is it possible to do more?
Thanks for any help you can provide!