Author: Rohan Aditya – breaking Condition Builder limits.
Key points covered:
Role required: admin
function ReportsAJAX() {
var incGr = new GlideRecord('incident');
incGr.addActiveQuery();
incGr.addQuery('priority', '1');
incGr.query();
var incidentArray = [];
while (incGr.next()) {
incidentArray.push(incGr.sys_id.toString());
}
return incidentArray;
}
🚨 If Sandbox isn’t checked, your script won't work and you’ll start questioning every life choice that led to this moment.
When you're filtering incidents, do this:
And boom — the Condition Builder starts behaving like it understands what you want. ✨
In the report Condition, add this: