We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Can you change the orientation of a RAM's Heatmap?

AnthonyGates
Tera Contributor

This is more for esthetic purposes, but is it possible to modify the display of the Residual Heatmap built into a Risk Assessment Methodology (RAM) in such a way as to flip the y-axis so it runs in the opposite direction?

For example:

AnthonyGates_0-1768162488528.png

The RAM is configured for:

  • Inherent Risk, Control Effectiveness, and Residual Risk
  • Heatmaps are enabled for both Inherent and Residual Risk Assessment Types
  • Residual Risk is configured for:
    • Calculate based on - Inherent risk and control effectiveness
    • Qualitative scoring logic - Lookup matrix between inherent risk and control effectiveness

Thanks in advance.

 

 

 

 

 

2 ACCEPTED SOLUTIONS

Its_Sagnic
Mega Guru

Hi @AnthonyGates ,

Hope you are doing well.

So I chceked your request this is not recommended to chnage the axis orientation.

It is not possible to modify the built-in ServiceNow Risk Assessment Methodology (RAM) Residual Heatmap display to flip the y-axis in the opposite direction (from 5 to 1 instead of 1 to 5) using standard configuration. The default display orientation of the axes within the out-of-the-box risk heatmap component is fixed by the system design. 
The standard configuration for heatmaps uses a fixed layout where scores typically increase from bottom to top and left to right. Your provided image illustrates the current (standard) layout and your desired aesthetic, but the desired visual is not achievable with the current built-in functionality. 
While you cannot flip the axis direction, you can configure other aspects of the heatmap, such as:
  • Axis Factors: Defining which factors (Impact, Likelihood, Control Effectiveness) are used for the X and Y axes.
  • Color Definitions: Adjusting the colors that correspond to different risk levels (Low, Medium, High).
  • Scoring Logic: Customizing how the scores are calculated (e.g., lookup matrix, script). 


But If you want to convert 5x5 to 6x6 or vice versa .yes that is possible.

If you find the answer Useful please mark it as Helpful.

Regards,

Sagnic

View solution in original post

Hi @AnthonyGates ,

In one of our recent requirement Client Requested that they will give the assessment based on 6 factors but in the Hitmap it must show the details in 5x5 format.

We need to create a Business rule to map the 5x5 Matrix to 6x6.

Conditions : 

Table : 

Risk Assessment Instance Response [sn_risk_advanced_risk_assessment_instance_response]


When : After
Action : Insert, Update
Condition : Assessment Instance.Risk Assessment Methodology  is  ( Select your Assessment Methodolody )


Code :

(function executeRule(current, previous /*null when async*/ ) {


    var sys = current.assessment_instance_id;
    var rec = new GlideRecord("sn_risk_advanced_risk_assessment_instance");
    rec.get(sys);

    var res = new GlideRecord("sn_risk_advanced_risk_assessment_instance_response");
    res.addQuery("assessment_instance_id", rec.sys_id);
    res.orderBy("sys_updated_on");
    res.query();

    while (res.next()) {
        var type = res.getValue("assessment_type");
        if (type == 1) {
            if (res.factor.getDisplayValue() == "Impact  (ERM RAM 6x6: MOE (With Inherent))") {
                var impact = res.getValue("qualitative_response");
                var calcImpact = res.getValue("u_normalized_score1");
                //normImpact = parseInt(normImpact);
            }
            if (res.factor.getDisplayValue() == "Likelihood (ERM RAM 6x6: MOE (With Inherent))") {
                var likelihood = res.getValue("qualitative_response");
                var calcLikelihood = res.getValue("u_normalized_score1");
                //normLikelihood = parseInt(normLikelihood);
            }
        } else if (type == 3) {//
            if (res.factor.getDisplayValue() == "Impact  (ERM RAM 6x6: MOE (With Inherent))") {
                var impactResidual = res.getValue("qualitative_response");
                var calcImpactResidual = res.getValue("u_normalized_score1");
                //normImpact = parseInt(normImpact);
            }
            if (res.factor.getDisplayValue() == "Likelihood (ERM RAM 6x6: MOE (With Inherent))") {
                var likelihoodResidual = res.getValue("qualitative_response");
                var calcLikelihoodResidual = res.getValue("u_normalized_score1");
                //normLikelihood = parseInt(normLikelihood);
            }
        }
    }
    // gs.info("Residual BinitaImpact " + calcImpactResidual);

    // gs.info("Residual  BinitaLikelihood " + calcLikelihoodResidual);
    var inherent = calcImpact * calcLikelihood;
    var residual = calcImpactResidual * calcLikelihoodResidual;

    // gs.info("Residual  Binitainherent " + residual);
    var inherentRating = "";
    var residualRating = "";

    if (type == 1) {
        if (inherent > 0 && inherent <= 6) {
            inherentRating = "Low";
        } else if (inherent > 6 && inherent <= 13) {
            inherentRating = "Moderate";
        } else if (inherent > 13 && inherent <= 19) {
            inherentRating = "High";
        } else if (inherent > 19 && inherent <= 25) {
            inherentRating = "Very High";
        }

        rec.setValue("u_computed_impact_score", impact);
        rec.setValue("u_computer_likelihood_score", likelihood);
        rec.setValue("u_calculated_impact", calcImpact);
        rec.setValue("u_calculated_likelihood", calcLikelihood);
        rec.setValue("u_calculated_inherent_score", inherent);
        rec.setValue("u_calculated_inherent_rating", inherentRating);
        rec.update();


    } else if (type == 3) {
        if (residual > 0 && residual <= 6) {
            residualRating = "Low";
        } else if (residual > 6 && residual <= 13) {
            residualRating = "Moderate";
        } else if (residual > 13 && residual <= 19) {
            residualRating = "High";
        } else if (residual > 19 && residual <= 25) {
            residualRating = "Very High";
        }

        rec.setValue("u_computed_impact_residual", impactResidual);
        rec.setValue("u_computed_likelihood_residual", likelihoodResidual);
        rec.setValue("u_calculated_impact_residual", calcImpactResidual);
        rec.setValue("u_calculated_likelihood_residual", calcLikelihoodResidual);
        rec.setValue("u_calculated_residual_score", residual);
        rec.setValue("u_calculated_residual_rating", residualRating);
        rec.update();
    }

})(current, previous);

 
Use the code above and if you get it helpful please markit as helpful.

Regards,


Sagnic

View solution in original post

11 REPLIES 11

Hello Sagnic, 

You explained that the heatmap pattern is to increase from left to right, but mine is the opposite.

Do you know how I can make it return to the correct orientation?

pverni_0-1770646651817.pngpverni_1-1770646684009.png

 

Hi @pverni ,

Its_Sagnic_0-1770649613375.png

Is this something you are looking for ??

Regards,

Sagnic

Yes Sagnic,

 

But my x-axis in heatmap start with my highest score (não atende = 3): 

pverni_0-1770653249926.png

If you see in my control assessment the order is 1,2 and 3. But in heatmap is 3,2 and 1:

pverni_1-1770653346826.png

Did you now how can I fix this?

Hi  @pverni ,

The Heatmap configuration is not directly derived from the Qualitative Rating Criteria.
Typically, heatmaps are configured based on either inherent or residual risk ratings.

 

 

SandeepDutta_1-1710909778412.png

For example, in an inherent assessment, once you open the assessment, you will need to configure the heatmap by selecting the X‑axis and Y‑axis values from the Heatmap Configuration section.

Qualitative Rating Criteria :

Assessment typeBackground colorLower rating intervalOverridden scoreRatingRisk appetite scaleRisk color styleDomainText color
Inherent Assessment#49A2520.002.00Very Low Very Low Riskglobal#000000
Inherent Assessment#B9D6293.004.00Low Low Riskglobal#2E2E2E
Inherent Assessment#FFC6515.009.00Moderate Moderate Riskglobal#2E2E2E
Inherent Assessment#EB894710.0016.00High High Riskglobal#2E2E2E
Inherent Assessment#D9545420.0025.00Very High Very High Riskglobal#000000


Heatmap Colors :

Assessment typeDisplay orderRisk color styleDomainX-axisY-axis
Inherent Assessment0Very Low RiskglobalInsignificantRare
Inherent Assessment1Very Low RiskglobalInsignificantUnlikely
Inherent Assessment2Low RiskglobalInsignificantPossible
Inherent Assessment3Low RiskglobalInsignificantLikely
Inherent Assessment4Moderate RiskglobalInsignificantAlmost Certain
Inherent Assessment5Very Low RiskglobalMinorRare
Inherent Assessment6Low RiskglobalMinorUnlikely
Inherent Assessment7Moderate RiskglobalMinorPossible
Inherent Assessment8Moderate RiskglobalMinorLikely
Inherent Assessment9High RiskglobalMinorAlmost Certain
Inherent Assessment10Low RiskglobalModerateRare
Inherent Assessment11Moderate RiskglobalModerateUnlikely
Inherent Assessment12Moderate RiskglobalModeratePossible
Inherent Assessment13High RiskglobalModerateLikely
Inherent Assessment14High RiskglobalModerateAlmost Certain
Inherent Assessment15Low RiskglobalMajorRare
Inherent Assessment16Moderate RiskglobalMajorUnlikely
Inherent Assessment17High RiskglobalMajorPossible
Inherent Assessment18High RiskglobalMajorLikely
Inherent Assessment19Very High RiskglobalMajorAlmost Certain
Inherent Assessment20Moderate RiskglobalCatastrophicRare
Inherent Assessment21High RiskglobalCatastrophicUnlikely
Inherent Assessment22High RiskglobalCatastrophicPossible
Inherent Assessment23Very High RiskglobalCatastrophicLikely
Inherent Assessment24Very High RiskglobalCatastrophicAlmost Certain



After completing this setup, you will see an option to configure the heatmap colors through a related list called Heatmap Colors. Here, you can define the appropriate color mappings, which will then be reflected in the Heatmap report.

If you find this solution helpful, please mark it as useful and accept the solution to close the thread.

Regards,

Sagnic

Hi @pverni ,

I hope you tried this solution.

If it is useful for you plese mark it as helpful.

Regards,

Sagnic