I need to set item in my form (select (yes/no value)) to sharepoint list column of type (Yes/No) Please help

1 Answer 1


In order to set yes/no fields use the 1 for yes and 0 for no as follows:

 var siteUrl = '/sites/MySiteCollection';
function updateListItem() {

var clientContext = new SP.ClientContext(siteUrl);
var oList = clientContext.get_web().get_lists().getByTitle('ListName');

this.oListItem = oList.getItemById(3);

oListItem.set_item('checkField', '1');


clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));

function onQuerySucceeded() {

alert('Item updated!');

function onQueryFailed(sender, args) {

alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.