Performance Analytics Job Throwing an Error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2022 11:14 AM
Hello All,
I have a requirement to get the total number of incidents being resolved within 15 minutes of their creation using PA Indicator which will in turn be used in the formula Indicator to calculate further based on needs.
I've created the below script in the Global application but the PA job throws following error - "Error during JavaScript evaluation com.snc.pa.dc.ScriptException: JavaScript evaluation returned: Undefined in script"
var getRecords = function() {
var created = current.sys_created_on;
var resolved = current.resolved_at;
var diff = gs.dateDiff(created, resolved, true);
var toMins = diff / 60;
var mins = parseInt(toMins);
if (mins < 15) {
return mins;
}
};
getRecords();
Indicator Created -
Please let me know if I am missing something here.
Regards,
Himesh
- Labels:
-
Performance Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 03:01 AM
Hi Himesh,
Did you added the fields used in 'Fields' field in the PA script? This should be done.