I have this CAML:
query.Query = @"<Where><Eq><FieldRef Name='MessageID' /><Value Type='Text'></Value></Eq></Where>";
This checks if the value of MessageID = string.empty()
What I would like to check for is null.... not empty string...
Is this possible with CAML?
CAML is an XML-based language that is used in Microsoft SharePoint Foundation to define the fields and views that are used in sites and lists.
There is no option for case sensitivity in caml queries.
CAML has the IsNull operator,so the query would be:
query.Query = @"<Where><IsNull><FieldRef Name='MessageID' /></IsNull></Where>"
Needed an equivalent to String.IsNullOrEmpty(Description)
. Ended up with this:
<And> <IsNotNull> <FieldRef Name='Description' /> </IsNotNull> <Neq> <FieldRef Name='Description' /> <Value Type='Text'></Value> </Neq> </And>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With