1

where DocumentOwner(People Group Type Column) = Me (Current Logged in User)

Here i save current logged in user in a variable named as OwnerTitle and RequestStatus(Choice Type Filed) is equals to Approved or Reject.

function getAutocompleteSource() {

debugger;
var clientContext = SP.ClientContext.get_current();

var oList = clientContext.get_web().get_lists().getByTitle('LAW Review Requests');

var camlQuery = new SP.CamlQuery();

camlQuery.set_viewXml("<View><RowLimit>100</RowLimit></View>");

collListItem = oList.getItems(camlQuery);

clientContext.load(collListItem);

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

}


function onQuerySucceeded(sender, args) {

var listItemInfo = "";

var listItemEnumerator = collListItem.getEnumerator();

while (listItemEnumerator.moveNext()) {

var oListItem = listItemEnumerator.get_current();

sArray.push(oListItem.get_item("RequestNumber"));

}

$("#PrevReqno").autocomplete({ source: sArray });

}

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, privacy policy and cookie policy

Browse other questions tagged or ask your own question.