As part of the GRC implementation, organization ABC implements a bunch of control. All of them obviously need to be continuously monitored. The team uses indicators to constantly monitor all of the ABC controls.
During implementation, the GRC team noticed that it is challenging to use the basic indicator type to monitor all control, especially control 123.
So what is the deal with control 123?
To comply with control 123, as a service owner, you need fewer than 3 open significant incidents against your service. If you have more than that, your control becomes non-compliant.
Okay, so now we understand that we need a scripted indicator. Let’s go ahead and implement a scripted indicator for control 123
Here is what I have to do to implement a successful scripted indicator
- Set the type to Script
- Navigate to the supporting tab and select the table, which, for me, will be the incident
- add the supporting data field, which is the column of data that needs to be provided to prove whether your indicator has been successful or not

- In the script field, we need to write the logic that will run on our control. I explain the script using code comments.
var offering = current.profile.applies_to.toString();//Dot-Walk to entity applies to field which is the service offering
var incArr = [];// This array should contain supporting data/incident and assigned at the end of the script to result.supportingDataIds
var isPassed = true; // iniate the value of the result to pass first
/*
Query All active Incident where the priority is critical and service offering is the same as control ABC entity
*/
var incGr = new GlideRecord('incident');
incGr.addEncodedQuery('active=true^priority=1^service_offering=' + offering);
incGr.query();
while (incGr.next()) {
incArr.push(incGr.sys_id +'');
}
// if three incident are found then IsPassed should be false
if(incArr.length >= 3)
{
isPassed = false;
}
result.value = 500;
result.passed = isPassed;
result.supportingDataIds = incArr;
Our scripted indicator is ready to be tested, so hit execute to test. Let’s then check the indicator status and indicator result.

