we have to work on the client side of SharePoint, so I use Javascript, not C#. I want to do a query with "contains" like so
function onRequestSucceeded() {
myList = website.get_lists().getByTitle("Prüfberichte");
var query = '<Where><Contains><FieldRef Name="Name_x0020_Lieferant_x0020__x0028_Supplier_x0020_name_x0029_"/><Value Type="Text">Hans</Value></Contains></Where>';
camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml(query);
items = myList.getItems(camlQuery);
clientContext.load(items, 'Include(Id, DisplayName, HasUniqueRoleAssignments)');
clientContext.executeQueryAsync(onQuerySucceeded, onQueryFailed);
}
Unfortunately, this returns the whole list, instead of the single item that contains "Hans".
This is a "contains"-specific problem, "Eq" works fine.
All help will be gladly appreciated!