(function execute(inputs, outputs) {
var getData="";
var gr = new GlideRecord("alm_hardware");
gr.addEncodedQuery('install_statusIN1,11^assigned_to=' + inputs.requestedforsysid);
gr.query();
while (gr.next()) {
getData+= "Model: "+ gr.getDisplayValue("model")+' '+",Status: "+ gr.getDisplayValue("install_status")+' '+",Assigned to: "+gr.getDisplayValue("assigned_to")+"\n";
}
outputs.hardwarelist=getData;
})(inputs, outputs);
How to get list of item in multiple row in flow Action script Service-now
Working Code Asked question July 11, 2023