manikorada
ServiceNow Employee

Johannes,



I will try to keep this in a function and see if it works. It would be something like:


myfunction();



function myfunction()


{


gs.log("running it");


var items = new GlideRecord('sc_req_item');


items.addQuery('number', 'RITM0011306');


items.query();


while (items.next()) {


  gs.log ("data found " + items.cat_item.name);


  gs.log ("data found " + items.variables.asset_name);


  items.variables.asset_name = 'No Asset';


  items.update();


}


}