Hi!
This is my update list function:
function updateListItem(listItemXP, listItemLevel, listItemApproved, listItemApprovedFinish) {var clientContext = new SP.ClientContext(URL);
var oList = clientContext.get_web().get_lists().getByTitle('DB_Person');
this.oListItem = oList.getItemById(2);
oListItem.set_item('Level', listItemLevel);//updates the column Level with the value of listItemLevel
oListItem.set_item('rwub', listItemXP);
oListItem.update();//Updates the lists
var oList = clientContext.get_web().get_lists().getByTitle('Assignmenttest');
this.oListItem_2 = oList.getItemById(1);
oListItem_2.set_item('Approved', listItemApproved);
oListItem_2.set_item('ApprovedFinish', listItemApprovedFinish);
oListItem_2.update();
clientContext.executeQueryAsync(Function.createDelegate(this, this.onUpdateSucceeded), Function.createDelegate(this, this.onQueryFailed));
}
How do i update my lists by the current user, instead of getting the item by a sertain ID? So if 4 assignmets is assigned to the same person they should all be approved and updated, instead of just ID 2 for example.