- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2012 02:16 PM
Apparently out compliance folk are not happy that our risk assessments do not version if they are retaken. A solution was proposed to capture the answers when it's taken and add them to the work notes of the change its attached to. Can a kind soul out there help me with the script to do this?
~Conan
Solved! Go to Solution.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2013 09:19 AM
Towards the bottom is how you get the score. The top bit is how you can get answers to specific questions.
Writing a Risk Assessment Answer Back to Change Form Field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2012 08:41 PM
OK, so I still have this issue. I'm unsure of how to catch the answers through a glide record. Would appreciate any help that is out there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2013 01:06 PM
I know it was a while ago, but were you able to get this Conan? I have a similar requirement 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2013 01:06 PM
I know it was a while ago, but were you able to get this Conan? I have a similar requirement 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2013 05:34 AM
Hi,
I don't believe you can (natively) collect the answers given during a Risk Assessment. This data doesn't get stored to a table anywhere. It's used strictly for the moment in time you generate a risk. It uses the data and compares it to the condition threshold and changes the overall risk. The individual responses are ignored and forgotten at that point.
Below is the UI action OOB that is responsible for generating the risk. As you can see, it's not storing the data anywhere. To change this you'd likely need to create a new table to store your responses in and then modify this UI action (named: Fill Out Risk Assessment) to glide query over to your new table and store the responses.
//create task_assessment record and open risk assessment in popup window
function invokeAssessment(){
var id = g_form.getUniqueValue();
var ga = new GlideAjax('CreateAssessment');
ga.addParam('sysparm_name','checkAssessment');
ga.addParam('sysparm_id',id);
ga.addParam('sysparm_class','change_request');
ga.getXMLWait();
var res = ga.getAnswer();
g_form.hideAllFieldMsgs();
if (res == 'No Condition'){
g_form.addInfoMessage('There are no risk assessments defined for this request');
}
else {
var resArr = [];
resArr = res.split(',', 2);
var taskAsmtID = resArr[0];
var assessmentName = resArr[1];
var d = new GlideOverlay({
title: 'Risk Assessment',
form: 'survey_take'
});
d.setPreference("sysparm_task_assessment", taskAsmtID);
d.setPreference("sysparm_survey", assessmentName);
d.setPreference("sysparm_survey_update", "false");
d.render();
}
}