can we calculate risk based on the answers of risk assessment questions before creating a change

learn nv
Tera Contributor

Hi All,

We have created a catalog item to raise change request. When the user selects the actual start time of change we should calculate the risk (based on the values provided by the end user to the given questions on the catalog item) and display the message about the lead time based on the risk. The risk calculation need to be done before the catalog item get submitted and change request being created.is it possible?

Right now, I am calculating the risk through a script in flow designer by calling the script include 'RiskCalculator' and passing the created change request after submission of catalog item. But the client is asking for risk evaluation before submitting the catalog item as user is providing the values for risk assessment questions in catalog item. is it possible?

 

 

 

 

3 REPLIES 3

AshishKM
Kilo Patron
Kilo Patron

Hi @learn nv , 

First of all, i don't understand why the org has catalog item for CHG record ( it's records for record ) creation. 

Second, as you mention about script include "RiskCalculator", you can call this in any onChange client script and get the Risk Calculation, you must have input parameter for risk calculation on catalog item. 

 

If you see any challenges , please share more technical details.

 

-Thanks,

AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Hi Ashish,

I am not getting how to calculate the risk score with only the answers of risk assessment.

I know the following code to calculate the risk assessment for a change.

new global.RiskCalculator(changeRecord).evaluateRiskImpact();
But this takes the input as change record. I tried to look into the code further more but could not able to figure out the way.
Could you please help.

On the form, I have only responses to risk assessment questions. No change request as it is will create once we submit the catalog item.