Performance Analytics script variables

Several variables are available for use in Performance Analytics scripts and formula scripts.

The following variables can be used in Performance Analytics scripts and formula indicator scripts. You can obtain a GlideDateTime object from these variables by calling getGlideObject(), such as in the example"Score main = " + score_end.getGlideObject().getDayOfWeek());
  • score_start: start of the collection period
  • score_end: end of the collection period
Example script for calculating the age of open incidents:
var diff=function(x,y){return y.dateNumericValue() - x.dateNumericValue();}; 
var days=function(x,y){return diff(x,y)/(24*60*60*1000);}; 
days(current.opened_at, score_end)