How to create a New Field on Incident Table

Eddie5
Tera Contributor

Hi Everyone,

I am learning ServiceNow; please help on how to create a custom field which can be used to report incidents where incident priority updated.

1 ACCEPTED SOLUTION

Satishkumar B
Giga Sage
Giga Sage

Hi @Eddie5 

to creating a custom field and tracking incidents where the priority was downgraded in ServiceNow:

Add a Custom Field to the Incident Table

  1. Navigate to: System Definition > Tables.
  2. Select: Incident table.
  3. Add Field:
    • Label: Priority Downgrade
    • Name: u_priority_downgrade
    • Type: True/False (Boolean)
  4. Save the Field.

Create a Business Rule

  1. Navigate to: System Definition > Business Rules.
  2. Create a New Rule:
    • Name: Track Priority Downgrade
    • Table: Incident [incident]
    • Active & Advanced: Checked
    • When to Run: Before, Update

 

 

(function executeRule(current, previous /*null when async*/) {
    if (current.priority > previous.priority) {
        current.u_priority_downgrade = true;
    }
})(current, previous);
​

 

 

……………………………………………………………………………………………………

Please Mark it helpful 👍and Accept Solution✔️!! If this helps you!!

View solution in original post

3 REPLIES 3

Ayushi12
Mega Sage

Hi @Eddie5,
To create a new field on the incident form.

  1. Open the form context menu and select Configure > Form Layout.
  2. Enter the Name and Type of the field in the Create new field and Save

Refer: https://docs.servicenow.com/bundle/washingtondc-it-service-management/page/product/change-management... 
For incident priority downgraded you can create a Onchange client script - if value of priority is degraded you can update custom field which can further used for reporting.

If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful."

Thanks!

Eddie5
Tera Contributor

Hi Ayushi, can you please write a script for me? I dont have knowledge on script writing.

Satishkumar B
Giga Sage
Giga Sage

Hi @Eddie5 

to creating a custom field and tracking incidents where the priority was downgraded in ServiceNow:

Add a Custom Field to the Incident Table

  1. Navigate to: System Definition > Tables.
  2. Select: Incident table.
  3. Add Field:
    • Label: Priority Downgrade
    • Name: u_priority_downgrade
    • Type: True/False (Boolean)
  4. Save the Field.

Create a Business Rule

  1. Navigate to: System Definition > Business Rules.
  2. Create a New Rule:
    • Name: Track Priority Downgrade
    • Table: Incident [incident]
    • Active & Advanced: Checked
    • When to Run: Before, Update

 

 

(function executeRule(current, previous /*null when async*/) {
    if (current.priority > previous.priority) {
        current.u_priority_downgrade = true;
    }
})(current, previous);
​

 

 

……………………………………………………………………………………………………

Please Mark it helpful 👍and Accept Solution✔️!! If this helps you!!