Record producer to create incident

Prerana1
Kilo Guru

Hello Guys,

I have created the record producer to let the end users create an incident in portal but our client want the end users to select impact and urjency of the issue and the choices for the impact and urjency are

impact choices 

  1. I’m the only one with this problem (=> result impact 4-low in incident)
  2. We are few with this problem (=> result impact 3-medium in incident)
  3. 3.We are a lot with this problem (=> result impact 2-high in incident )
  4. All are impact with this problem (=> result impact 1-critical in incident)

how to set the impact values in the incident based on these choices selected by the end users.

Thanks and Regards,

Prerana

1 ACCEPTED SOLUTION

Chander Bhusha1
Tera Guru

Hi Prerena,

You have to write script in record producer scripts and check the value and according to it set the values.

The sample of the code would be:

 

if(producer.variables.impact = 'I’m the only one with this problem ')  //backeend value of the choices of impact varialbe
current.impact = '4';
else if(producer.variables.impact = 'second optoin')
current.impact = '4';
if(producer.variables.impact = 'third optoin ')
current.impact = '2';

 

 

Please mark helpful and correct.

Thanks,

CB

 

View solution in original post

6 REPLIES 6

Harish Vaibhare
Kilo Guru

Hi,

i want to add few lines to megha's answer.

write below code : 

 

   if(producer.impact == "I’m the only one with this problem" )

   current.impact= '4';

   else if(producer.impact == "We are few with this problem" )

   current.impact= '3';

   else if(producer.impact == "We are a lot with this problem" )

   current.impact= '2';

  else if(producer.impact == "All are impact with this problem" )

   current.impact= '1';

   

 

Kindly Mark helpful and correct if it works.

Thanks.

Satyanarayana C
ServiceNow Employee
ServiceNow Employee

Hi,

Create a variable in the record producer as shown below:

The values 3, 2 given in the question choices, comes from the sys_choice table as shown in the second screenshot

find_real_file.png

find_real_file.png

Thanks