Add fields or variables to the incident work notes when it is created

Alex Suarez
Tera Contributor

Hello everyone,

I need your help in explaining how to add fields or variables to the incident work notes when they are created.

 

For example:

In this section, add a variable called "street" which was already captured in the service portal form.

 

AlexSuarez_0-1764963707216.png

 

Thanks

 

2 REPLIES 2

Its_Azar
Kilo Sage
Kilo Sage

Hi there @Alex Suarez 

 

You can add Record Producer variables into the initial Work Notes of the Incident . You need to add logic either in the Record Producer or in a Business Rule that runs at insert. the easiest way is to add a small Business Rule (Before Insert) on the incident table. Record Producer variables are stored in RITM  sc_item_option records, so you pull them using producer or via the RITM reference.

BR snippet:

if (current.request_item) {

    var street = current.variables.street || '';

    if (street) {
        current.work_notes = "Street: " + street + "\n\n" + current.work_notes;
    }
}

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG

Hi Mohamed, thank you so much for your support.

 

I'd like to identify the business rule that currently adds these fields to the initial work notes as "field changes" and modify it to add the "street" variable, without creating a new one.

 

Do you know if ServiceNow has a default business rule to add the fields to the initial work notes as shown in the "field changes" image?

 

I would greatly appreciate any information you can provide.

 

Alex

 

AlexSuarez_0-1765461005312.png