Risk and Impact calculation in change request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 07:34 PM
Hi All,
I have requirement of Calculating Risk based on 2 set of questionnaire example 5 questionnaire related to risk and risk should get calculated and another set of questions based on which impact should get calculated and based on these results risk and impact again a new "New Risk" ( Customized field) field should calculated.
I am able to create single assessment using the Risk assessment plugin and its calculating risk field, however my client a questionnaire of impact as well . How to achieve this. Means based on 2 assessments the final result should get populated.
Example - Risk is low as per the assessment and impact is Moderate then in the field " New Risk" result should be "Minor".
Is it possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 07:51 PM
HI @ServiceNow10sun ,
I trust you are doing great.
Here's an example script that you can adapt to calculate the "New Risk" field:
(function() {
// Get the values of risk and impact assessments
var risk = current.risk_assessment_field; // Replace with the actual field name for risk assessment
var impact = current.impact_assessment_field; // Replace with the actual field name for impact assessment
// Define mapping of risk and impact levels to the "New Risk" levels
var riskMapping = {
'Low': {
'Low': 'Minor',
'Moderate': 'Minor',
'High': 'Moderate',
'Very High': 'Significant'
},
'Moderate': {
'Low': 'Minor',
'Moderate': 'Moderate',
'High': 'Significant',
'Very High': 'High'
},
'High': {
'Low': 'Moderate',
'Moderate': 'Significant',
'High': 'High',
'Very High': 'Critical'
},
'Very High': {
'Low': 'Significant',
'Moderate': 'High',
'High': 'Critical',
'Very High': 'Critical'
}
};
// Set the value of the "New Risk" field based on risk and impact assessments
var newRisk = riskMapping[risk][impact];
// Update the "New Risk" field
current.new_risk_field = newRisk; // Replace with the actual field name for the "New Risk" field
})();
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 12:36 PM
Hello,
Is this based upon a br on the assessment table?
Thanks,
Chad
