Hi I'm in need of some help with a caml query. I have 1 column in my list, that have 3 different choice.
I want to query out items if the choice is equal to YES
This is my code:
var context = new SP.ClientContext.get_current();
enter code hered
var web = context.get_web();
var list = web.get_lists().getByTitle("MyList");
var viewXml = String.format(
"<View>" +
"<Query>" +
"<Where>" +
"<Eq>" +
"<FieldRef Name='MyChoiceField' />" +
"<Value Type='Choice'>YES</Value>" +
"</Eq>" +
"</Where>" +
"</Query>" +
"</View>");
var query = new SP.CamlQuery();
query.set_viewXml(viewXml);
this.items = list.getItems(query);
The rest of the code works except the query