Edit Assessment Responses

vt5
Tera Expert

There were some instances where the users contacted us asking to modify their responses as they misunderstood the questions or they had incorrect information at the time. Policy violation and fraudulent aside, from a technical perspective, is there a way we could modify their responses? I tried various Access Control rules on "asmt_assessment_instance_question" to allow admin with Write access but I still cannot modify the response and get the warning "Security prevents writing to this field"

I tried:
asmt_assessment_instance_question.value with role=admin
asmt_assessment_instance_question.* with role = admin
asmt_assessment_instance_question.* with condition answer = (new AssessmentUtils()).hasAssessmentRoles(current.instance.metric_type.roles);

Any advice?
Thank you,

4 REPLIES 4

Sulabh Garg
Mega Sage
Mega Sage

Hello VT,

I am not sure why ACL is not working. Alternatively you can try below fix script to change the value on "asmt_assessment_instance_question" Table. 

Below is the fix script, I tried on my personal instance and its working

 

var grAAIQ = new GlideRecord('asmt_assessment_instance_question');
grAAIQ.addEncodedQuery("instance=f57bc3c407001110d8effa7f7c1ed0f0");//Assmt.Instance sysid
grAAIQ.query();
while (grAAIQ.next()) {
grAAIQ.value=3;
grAAIQ.autoSysFields(false); // this is optional if you do not want to display your name in updated by.
grAAIQ.update();
}

 

Please Mark ✅ Correct/helpful, if applicable, Thanks!! 

Regards

Sulabh Garg

Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

Hi Sulabh, 

Sorry for the late response. I tried the script and it changed all the responses to the value "3". How do I pick a specific question to alter the value? 

The assessment consists of multiple questions. Some are free text while others are multiple choice with Numerical values that tie to a template to display text value. 

Thank you, 

 

Hello VT,

Script I gave you is just for example, That you can change the assessment responses, You can change the value of responses through script for free text field or multiple choices with numerical values as well.

This script is helpful for limited usage to change the assessment results as you asked in your original question "from a technical perspective, is there a way we could modify their responses?"

Hope it helps!!

 

Please Mark ✅ Correct/helpful, if applicable, Thanks!! 

Regards

Sulabh Garg

Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

Sulabh Garg
Mega Sage
Mega Sage

I hope my answer helped you, Please let me know if any follow up is required here, If not, Please mark my response as helpful and correct so that this thread can be closed.

Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg