The CreatorCon Call for Content is officially open! Get started here.

Incident quick messages insertion in ticket activity

MarkT2445801916
Tera Contributor

New to using reports - In servicenow is there a way to create an incident report that show if an email template quick messages is added to the activity of the ticket?

 

If there is a kbase or instructions on "how to" that would be helpful 

2 REPLIES 2

shawnmccoy
Tera Contributor

I haven't done this, but am hoping this may point you in the right direction.  My understanding is that this is not something you can do OOB.   To do what you are asking you'd need to either create a report against sys_email which contains the necessary filters to return what you're looking for.   Hopefully you'd have some unique way to identify the messages you're looking for.  Another option would be to create a rule that populates a custom field on incident that you can report on.

Steps to Create a Database View

  1. Navigate to:
    System Definition > Database Views

  2. Click "New" to create a new view.

  3. Fill in the form:

    • Name: e.g., incident_journal_view
    • Label: Friendly name for the view
    • Description: Optional
  4. Add View Tables:

    • Click "New" under the View Tables related list.

🔹 First Table: Incident

  • Table: incident
  • Variable Prefix: inc (this will prefix all fields from the incident table, e.g., inc_number, inc_short_description)
  • Order: 100
  • Left Join: False (unless you want all incidents even if they have no journal entries)

🔹 Second Table: sys_journal_field

  • Table: sys_journal_field
  • Variable Prefix: jrn (e.g., jrn_value, jrn_element_id)
  • Order: 200
  • Left Join: False
  1. Define the Join Condition: In the Where Clause, use:

     
    inc_sys_id = jrn_element_id AND jrn_element = 'comments'
     
     
    inc_sys_id = jrn_element_id AND jrn_element = 'comments'
     
     

    This joins journal entries that are comments on incidents

  2. Save the View.

====================

But it fails here as I cannot filter on jrn.value

 

Use the Database View

Make sure you've created a view (e.g., incident_journal_view) that joins:

  • incident table (prefix: inc)
  • sys_journal_field table (prefix: jrn)
  • Join condition: inc.sys_id = jrn.element_id AND jrn.element = 'comments'

2. Create the Report

  • Go to Reports > Create New
  • Name: e.g., Incident Activity Keyword Search
  • Source type: Table
  • Table: Select your database view (e.g., incident_journal_view)

3. Set Filters

To search for keywords in the activity log:

  • Add a filter like:
    jrn.value contains "email template""