Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Reporting on RITM Variables and Task SLA fields

ShaidaC
Tera Contributor

Hi,
I am trying to create a list report in ServiceNow that displays both RITM (Requested Item) variables and Task SLA fields (e.g., Business elapsed time) as columns. I have attempted using database views, dot-walking, and data sources, but have not been successful. Also followed some guides on the community but no luck.

I was able to bring the variables in the table cells but our requirement needs the variables as columns of the table.  Any help would be appreciated.

Thanks,
Shaida

8 REPLIES 8

YaswanthKurre
Tera Guru

Hi @ShaidaC ,

 

To report on RITM Variables and Task SLA fields together, you need to join four core tables for the basic structure, plus an additional join for each variable you want to display as a column.

The four essential tables needed for the base structure are:

  1. sc_req_item 

  2. task_sla 

  3. sc_item_option_mtom 

  4. sc_item_option 

sc_item_option is the maintain to pull your variables.

 

Mark this  as helpful and correct if this helps you.

 

Thanks,

Yaswanth

Hi @YaswanthKurre ,

Tried creating the database view as per your isntructions. Below is how my database view looks:

ShaidaC_2-1759728932741.png

In the report, I was able to get the variables by going to Parent Item[+]--->Variables[+]---> all the variables. But the problem is that, when I try to run the report after getting the variables, the RITM variables disappear from the bucket

ShaidaC_3-1759729051856.pngShaidaC_4-1759729069063.png

Not sure why this is happening

NavinAgarwal
Mega Guru

Hi @ShaidaC ,

 

Creating a list report in ServiceNow that combines RITM variables and Task SLA fields requires a database view or a report on the sc_req_item table with related list fields.


Method 1: Using a Database View (Recommended for complex reporting)
Create a Database View:

  • Navigate to System Definition > Database Views.
  • Click New.
  • Provide a Name (e.g., u_ritm_sla_report).
  • Add the following View Tables:
    sc_req_item (Prefix: ritm)
    task_sla (Prefix: sla)
  • Define Where Clause for the task_sla table: sla_task = ritm_sys_id. This links the SLA to the RITM.
  • Save the Database View.

Create the Report:

 

  • Navigate to Reports > Create New.
  • Select Table as the Source type.
  • Choose your newly created Database View (e.g., u_ritm_sla_report) as the Table.
  • Select List as the Type.
  • In the Configure tab, select the desired Columns. You can now access both RITM fields (e.g., ritm_number, ritm_short_description) and Task SLA fields (e.g., sla_business_elapsed_time, sla_stage) directly.
  • Add RITM variables by scrolling to the bottom of the Available list and selecting Variables, then choosing the specific variables you want to display.
  • Apply any necessary Filters.
  • Save the report.

Method 2: Reporting directly on sc_req_item and adding related list fields

 

Create the Report:

  • Navigate to Reports > Create New.
  • Select Table as the Source type.
  • Choose Requested Item [sc_req_item] as the Table.
  • Select List as the Type.
  • In the Configure tab, select the desired RITM fields as Columns.
  • To add Task SLA fields, scroll down in the Available list and expand the Task SLA (or Task SLA > Task SLA) section under Related List Fields. Select fields like Business elapsed time or Stage.
  • Add RITM variables by scrolling to the bottom of the Available list and selecting Variables, then choosing the specific variables you want to display.
  • Apply any necessary Filters.
  • Save the report.

Note: The Database View method provides more flexibility and potentially better performance for complex queries involving multiple tables, while the direct reporting method is simpler for straightforward scenarios. When adding variables, ensure the selected variables are relevant to the RITMs being reported on.

 

If you found my response helpful, could you please mark it as ‘Accept as Solution’ and ‘Helpful’? This small action goes a long way in helping other community members find the right answers more easily and supports the community.

Hi @NavinAgarwal ,
Tried both the methods
1. Database view doesn't show Variables[+]  in the available columns in Report
2. Related list does not show when I try to report on the sc_req_item table.