How to include record producer variables into Incident Description field

Renu9
Tera Contributor

Hi All,

I m using record producer to create an Incident record.

There are 4 variables in my record producer where I need to include all these variable questions with answers into the Incident record Description field.

Could you please guide me how can this be achieved?

 

 

Variables in Record producer:

1. Date of issue

2.Time of Issue

3.How many users affected

4. Required Information

 

I want the description field to appear in the Incident form something like this:

 

Below are the details

1. Date of issue : 17-10-2023

2.Time of Issue: 10 CET

3.How many users affected: 2

4. Required Information : Test

2 ACCEPTED SOLUTIONS

Jaspal Singh
Mega Patron
Mega Patron

Hi Renu,

In the Record producer for the Incident you can try adding something as below to the Entitlement script

var dateis=producer.date_of_issue;//replace the variabledate_of_issue name accordingly
var timeis=producer.tiem_of_isse;//replace the variable time_of_issue name accordingly
//so and and so forth for other variables
current.description=dateis+' '+timeis;

 

View solution in original post

Harsh_Deep
Giga Sage
Giga Sage

Hi @Renu9 ,

 

In the Record producer for the Incident you can try adding below script in producer script

var date=producer.date_of_issue;//replace the variabledate_of_issue name accordingly
var time=producer.time_of_isse;//replace the variable time_of_issue name accordingly
var affectedUsers=producer.how_many_users_affected;//replace the variable how_many_users_affected name accordingly
var requiredInfo=producer.required_information;//replace the variable required_information name accordingly
current.description=date+' '+time+' '+affectedUsers+' '+requiredInfo;

 

Please be sure to bookmark this article as well as mark it as Helpful if you thought it was helpful.

 

View solution in original post

5 REPLIES 5

Jaspal Singh
Mega Patron
Mega Patron

Hi Renu,

In the Record producer for the Incident you can try adding something as below to the Entitlement script

var dateis=producer.date_of_issue;//replace the variabledate_of_issue name accordingly
var timeis=producer.tiem_of_isse;//replace the variable time_of_issue name accordingly
//so and and so forth for other variables
current.description=dateis+' '+timeis;

 

Script field and not Entitlement Script of Record producer.

Ankur Bawiskar
Tera Patron
Tera Patron

@Renu9 

Please share what script did you start with and where are you stuck?

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

Harsh_Deep
Giga Sage
Giga Sage

Hi @Renu9 ,

 

In the Record producer for the Incident you can try adding below script in producer script

var date=producer.date_of_issue;//replace the variabledate_of_issue name accordingly
var time=producer.time_of_isse;//replace the variable time_of_issue name accordingly
var affectedUsers=producer.how_many_users_affected;//replace the variable how_many_users_affected name accordingly
var requiredInfo=producer.required_information;//replace the variable required_information name accordingly
current.description=date+' '+time+' '+affectedUsers+' '+requiredInfo;

 

Please be sure to bookmark this article as well as mark it as Helpful if you thought it was helpful.