loop round variables - server side

var gr = new GlideRecord('sc_req_item'); if (gr.get('number', 'RITM00106xx')) { var set = new GlideappVariablePoolQuestionSet(); set.setRequestID(gr.sys_id); set.load(); var vs = set.getFlatQuestions(); for (var i = 0; i < vs.size(); i++) { if (vs.get(i).getLabel() != '' && vs.get(i).getDisplayValue() != '') { gs.print(vs.get(i).getName() + '; ' + vs.get(i).getLabel() + ': ' + vs.get(i).getDisplayValue()); } } 

} 

Comments

Popular posts from this blog

Running transform maps asynchronously

GlideRecord setValue

Post a command to the ECC queue for the mid server to initiate a powershell file copy