Javascript Probe Scripting console
The MID Server Console for Javascript Probes is very helpful when working with probes on the MID Server, whether these probes are your own custom probes, or out of the box probes.
One benefit of using MID Server Probes in ServiceNow is that you can have a set library of functions and rather than changing the script of elements, you can pass parameter elements to the probe.
Simple Javascript Probe Example

Console
Parameters
min: 200
max: 210
Command
var res = [];
var min = probe.getParameter("min");
var max = probe.getParameter("max");
res.push("min: "+min+" max: "+max);
var rand = CloudRequestUtil.randomIntFromInterval(parseInt(min),parseInt(max));
res.push("rand: " + rand);
probe.createOutputResult(res.join("\n"));
Result
min: 205 max: 220
rand: 217
Last updated