We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

how to edit already submitted survey cores rating 3 to 4

Aparna
Tera Contributor
 
1 ACCEPTED SOLUTION

Robbie
Kilo Patron

Hi @Aparna,

 

As @Dr Atul G- LNG advises, proceed with caution. However, assuming this process has been considered and it is possible that a score legitimately needs to be updated, use the following script in either a Background script or Fix Script for re-use if required.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.


Thanks, Robbie

try {
    var surveyGR = new GlideRecord("asmt_assessment_instance_question");
    if (surveyGR.get("012a2c44d7211100158ba6859e6103b9")) { // This is the sys_of of the question to update on the submitted survey //Check this by reviewing the questions and make sure you have the correct one.
        gs.print('Survey Instance, question and value: ' + surveyGR.instance.getDisplayValue() + ' - ' + surveyGR.metric.getDisplayValue() + ' :' + surveyGR.value);
        surveyGR.value = 3; //modifying value field
        surveyGR.setWorkflow(false); //Prevent trigger Business rules, workflows etc
        //Once you are happy you have the correct question - uncomment the below update() line
        //surveyGR.update(); 
    }
} catch (e) {
    gs.info('Error thrown in Background Script / Fix Script: Name to be entered here if Fix Script' + e);
}

 

View solution in original post

7 REPLIES 7

Dr Atul G- LNG
Tera Patron

Hi @Aparna 

 

Any reason to make change in score, it is against policy. 

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG

****************************************************************************************************************

actually user gave the survey score 3 by mistake but now he wants to give 4 in the place of 3

Hi @Aparna 

 

https://www.servicenow.com/community/now-platform-forum/is-it-possible-to-edit-a-submitted-survey/m-...

 

https://www.servicenow.com/community/service-management-forum/can-you-edit-a-survey-response/m-p/412...

 

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG

****************************************************************************************************************

I have that survey_admin role but im not able to edit that score can you please help me on this