- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2016 01:38 AM
Hi Experts,
I need to implement Impact assessment with set of questions/scores same like it is existing for Risk Assessment in the change form.
I have a list of questions and scores provided separately for both Risk as well as Impact, and can see that currently Risk assessment is already implemented, which also calculates Impact with it for each change by default.
I need to perform this action separately for both Risk & Impact. I have gone through few links Using Change Risk Assessment - ServiceNow Wiki which explains the concept clearly, for this.
However, there are links(UI actions) mentioned in this page like "Fill out Risk Assessment" and "Execute Risk Calculation". The 1st UI action, contains set of question only for Risks which calculates based on scores. Similarly I need to implement this for Impact as well like adding new UI actions only for Impact something like this--> "Fill out Impact Assessment" and "Execute Impact Calculation". I know I can copy paste same code for Impact as well, but need to know some additional background scripts running behind this, i.e., BRs and Script includes, also System properties. How these are inter related.
Could any one please guide me on this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2016 03:15 AM
Hi,
I have implemented this for Impact assessment by creating a table for Impact Assessment similar as Risk Assessment. Also, applied same scripts for Impact process separately as similar to Risks.
Hence, Marking this as resolved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2016 01:52 AM
For the current client and they way it needed to work here, I created a new table for the Risk / assessment questions
each question has its answers as a numerical value
A onload script does nothing, but has a calculation script
function onLoad() {
//Type appropriate comment here, and begin script below
// call the function below to check Risk
calculateRiskFromQuestions()
}
function calculateRiskFromQuestions()
{
// set our initial score and a boolean field to determine if we have any empty questions
// Then go off and check each question. if not empty, get its value into Integer and add to the intScore
// If empty, add the marker and we then do not read any further questions
var intScore = 0;
var bolEmpty = false;
if (g_form.getValue('u_testing_level') != '')
intScore = intScore + parseInt(g_form.getValue('u_testing_level'));
else
bolEmpty = true;|
// repeat as needed
// see if we had any unanswered questions
// if not, check the score value and then set the risk
if (bolEmpty == false)
{
if (intScore < 15)
g_form.setValue('risk',2);
else if (intScore > 23)
g_form.setValue('risk',4);
else
g_form.setValue('risk',3);
}
This same calculation function is called as an onChange script by each of the fields that change on the form. Makes the calculation dymanic, does not bother if a value is empty
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2016 02:06 AM
Hi Julian,
Could you please tell me whether I need to create a new client script similar to above separately for Impact assessment along with UI actions? And what is this field name: u_testing_level
Thanks,
Rathika.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2016 02:41 AM
The above will perform the analysis as the user updates the relevant question
- no ui action needed
u_testing_level is just the field name of one of the questions / fields on the form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2016 03:23 AM
Hi Julian,
Could you please provide me the screen shot of table you have created, if you dnt mind. I am unable to relate the scenario with script and the table. Also, If I need this to implement for Impact, I have already added the assessment questions in the assessment_master table for Impact. Please refer below screen shots.