Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Inbound action to update Assessments

Kumar96
Kilo Contributor

HI

 

I am developing a smiley survey response. I am using surveys and assessments to do the same.

 

The survey is sent and the user receives the emails like this.  User clicks on a image and an inbound action is triggered to update the assessment

find_real_file.png

 

It is working as designed but the assessment data is not complete.  Below is my code for inbound action

var gr = new GlideRecord("asmt_metric_result");
gr.initialize();
gr.instance = current.sys_id;
gr.source_id = '0da79929db086b04c296d7795e9619f7';
gr.actual_value = resp;
gr.string_value = stringValue;
gr.datatype = 'imagescale';
gr.assessment_group = current.assessment_group;
gr.user = current.user;
gr.taken_on = gs.nowDateTime();
gr.metric = current.metric;
gr.insert();

current.state = 'complete';

current.update();

 

The data that is updated is like this.  the survey has 2 questions.  It is not updating the actual values and the string values .

 

Am I missing something. Can any one help me in this

 

find_real_file.png

5 REPLIES 5

Were you able to solve this issue? I am facing the exact same issue. The actual values are not getting updated correctly via inbound action.