PAScorecard - addParam(String parameter, String value)

Add a query parameter to filter the returned scores.

Call this method multiple times on the same PAScorecard object to pass multiple parameters, such as the indicator sys_id and a breakdown sys_id. After specifying all parameters, call query() to run the query and get the resulting scorecard object.

Table 1. Parameters
Name Type Description
parameter String The parameter to set. For a detailed list of available parameters, see PAScorecard parameters.
value String The value to assign to the specified parameter.
Table 2. Returns
Type Description
var sc = new SNC.PAScorecard(); //in a scoped app, do not use the SNC namespace
sc.addParam('uuid', 'fb007202d7130100b96d45a3ce6103b4');       // Number of open incidents
sc.addParam('breakdown', '0df47e02d7130100b96d45a3ce610399');  // by Priority
var result = sc.query();
var json = sc.asJSON();
for (var i = 0; i < result.length; i++)[i].name + ': ' + result[i].value + ' ' + result[i].unit.display_value);