Comment
Shane J
Tera Guru

The funny/not so funny thing is that your script worked for everyone but me.  ServiceNow support wasn't really able to explain it either but their slimmed down approach in the Script Step does work for me:

 

 

(function execute(inputs, outputs) {
inputs.ritm.variables[inputs.myvar] = inputs.myvalue;
inputs.ritm.update();
})(inputs, outputs);