servicenow query business rule to filter out all inactive users
function onBefore(current, previous) { //Type appropriate comment here, and begin script below var gr = new GlideRecord('sys_user'); gr.addQuery('active', false); gr.addQuery('department', '!=', 'Service Desk'); gr.query(); while(gr.next()) { current.removeOption(gr.sys_id.toString()); } }