The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to hide Score on Risk Assessment form based on respective Manual Factor value selected?

Novin
Tera Contributor

I have a requirement about Risk Assessment Methodology (RAM). When configuring Manual Factors for RAM, along with the valid choices for each Manual Factors, business wants one more choice "N/A - Exclude from risk calculation", which will exclude the respective Manual Factor from risk score calculation when selected.

Question 01.png

I have created a choice "N/A - Exclude from risk calculation" with score value "99" and I have used the following logic to exclude the respective Manual Factor.

 

    var sum = 0;
    var arr = [];
    arr.push(FAC0001001);
    arr.push(FAC0001002);
    arr.push(FAC0001003);
    arr.push(FAC0001004);
    
    for (i = 0; i < arr.length; i++) {
        if (arr[i] < 99) {
            sum += arr[i];
        }
    }
    score = Math.round(sum);

 

The risk score calculation is working as per expectation and when "N/A - Exclude from risk calculation" choice is selected, the respective Manual Factor is getting excluded from risk score calculation, but the score value of the respective Manual Factor is visible on Risk Assessment form which creates confusion for Assessor (user). How to hide the respective score value?

Question 02.png

1 REPLY 1

jaikishan1
ServiceNow Employee
ServiceNow Employee

Hi @Novin ,

Can you let me know what problems are you facing with the "none" option. I think the none option would also serve your requirement. You can also make the factor as non-mandatory to achieve the same.

To answer your question, there is no easy way to make the score fields invisible for certain options. However, the calculation of the scores and the values are configured using an UI script. You can still achieve your requirement by customizing the following UI script to handle the cases pertaining to your needs: 
Table: sys_ui_script
Script Name: sn_risk_advanced.AdvancedAssessment

Regards,
Jai

Please mark this as helpful if it solves your query.

Regards,
Jai