Sampling in Scripted Control Indicator

Swati K2
Tera Contributor

Hi, We have a requirement in Control Indicators, where we need to fetch only few samples of the Supporting data from the full population. We know that there is already a "Sample size" field on a Basic Indicator. But we need to implement the same logic on Scripted Indicator. When we configure a Scripted Indicator, the Sample size field is not available on the Indicator ( sn_grc_indicator) form. 

Has anyone come across such scenario and implemented it? How can we do sampling on Scripted indicator?

1 REPLY 1

Jan Spurlin
ServiceNow Employee
ServiceNow Employee

Ok - I'm not a javascript developer - so take this with a grain of salt...  but couldn't you use the set limit function?

 

One other thing to consider is that built into the basic indicators (I believe) is a random starting point.  So, we aren't always testing the same 50 items.

 

You might take a look at this script include: BasicIndicatorStrategyBase