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

Harsh Vardhan
Giga Patron

you can try to map the impact and urgency variable with incident "impact" and "urgency" field. rest data lookup rule will does further work. 
when you will create a variable these is check box "Map to Field" , just checked it. 

doc link for further details. 

 

https://docs.servicenow.com/bundle/kingston-it-service-management/page/product/incident-management/r...

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

 

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Prerana,

if target field is to be populated based on combination of record producer variable value then you can use script

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Megha Padale
Giga Guru

Hi,

Write a script like this

if(producer.impact=='your option')

current.impact ='1';

If my answer helped you in any way, mark answer as correct and helpful.

Thanks and regards, 

Megha.