Set a choice list value from record producer script.

Sam Ogden
Tera Guru

Hi All,

I've created a record producer for some incidents.   All the incidents created via this record producer will be Sev 2 so we are not asking them a severity question.

I have been trying to set the value of the questions in the record producer script but not having any luck.

Back end incident form has the following fields:

find_real_file.png

The answer to 'number of users affected' & 'number of transactions affected'   set the value of the 'impact' field.

Then the answers to 'impact' & 'urgency' then set the value for 'severity'

Below is an example of how the choices are setup.

find_real_file.png

In the record producer script I have the following:

find_real_file.png

I have also tried with '2' and "2" and still it does not set the value in the back end incident form.

Any help as to where   I am going wrong is greatly appreciated.

Thanks

Sam

1 ACCEPTED SOLUTION

Thanks Michael, I was not aware.


Sam the only way now is locate the error using gs.log. Maybe you can also copy the last three rows of your script in a new record producer, it will work.



Regards,


Valentina


View solution in original post

25 REPLIES 25

Hi Valentina,



I've added the follow 'gs.log':



find_real_file.png



I am not seeing anything in the Script log statements



The short description is being set on the incident form



find_real_file.png



Are my log statements correct?



Thanks


Could you check if the short_description mapping maybe is done in the variable with the 'map to field' flag?



Regards,


Valentina


Hi Valentina,



Just checked and this is not set:



find_real_file.png



me and a colleague have also checked on the incident form and can't see any other scripts running on insert for the fields in question, so we think that the issue is in the record producer script but can't see anything wrong.



Thanks



Sam


Ok, I haven't other idea about the short description.. but I still guess there is an issue in the script too.



The gs.log at the beggining of the code is printed in the log?


The assignment 'current.u_environment = env;' is 'env' correct?



Regards,


Valentina


HI Valentina,



I am not seeing any of my gs.log statements printed in the log.



Thanks