I have a list inside SharePoint online site collection. the list contain a field named
Processed which is of type single line of text, and only one item have a value inside this field while the other does not have values.
I write this CAL query to get the single item:
List oList = context.Site.RootWeb.Lists.GetByTitle(listname); CamlQuery camlQuery2 = new CamlQuery(); camlQuery2.ViewXml = "<Query><Where><Contain><FieldRef Name='Processed'/>" + "<Value Type='String'>Not Processed</Value></Contain></Where></Query>"; ListItemCollection collListItem2 = oList.GetItems(camlQuery2); context.Load(collListItem2); context.ExecuteQuery(); foreach (ListItem li in collListItem2)
but this CAML returned all the items, although one item has the correct value, while the other have empty/null value for the Processed field.
Any advice to resolve this issue?