We can use c.server.update() method to execute server side script again where it can access client side 'data' object as 'input' object.
Example : Send change number from client side to server side code and get associated assignment group.
Client Script Code :
function() {
/* widget controller */
var c = this;
c.data.chgNumber = "CHG00232";
c.data.actionName="getChangeAssignmentGroup"
c.server.update().then(function(response){
console.log(response.assignment_group;
});
}
Server side code :
if (input) {
if (input.actionName == "getChangeAssignmentGroup") {
var grChange=new GlideRecord("change_request");
if(grChange.get("number",input.chgNumber){
input.assignment_group=grChange.assignment_group;
}
}
}