Database view - Incident and sc_req_item

David Santel
Giga Guru

We have setup an choice field on incident form. Choice field= Ticket Type:  Incident or Request Type.

On incident form we have Category EOL , subcategory - laptop replacement. 

On sc_req_item we have EOL item.

I need to merge the 2 reports to understand total EOL upgrades for x time. 

 Is this possible? If so how would the database view be configured?

 

 

Thanks!

 

 

 

 

 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi David,

Could you please created database view as I created below. It's working for me.

In the Incident and Requested Item tables, we have common thing is parent table i.e. Task. So I have configured as below.

Kindly let me know if it is helpful for you.

 

find_real_file.png

View solution in original post

19 REPLIES 19

David Santel
Giga Guru

I tried this database view not working 

Jaspal Singh
Mega Patron
Mega Patron

Hi David,

 

If I understand you have below.

1. A field on Incident form with choices as Incident or Request

2. You want to report on RITM table & Incident table (where type is Request)

3. If Yes, on incident table is there any reference number for RITM or REQ. In other words do you have something/some field on Incident form that has some details about REQ or RITM?

1. Correct and will report on Field Ticket Type = Service Request

2. Ritm = Request and Inc - Ticket Type = Service Request

3. No reference on Incident table to RITM. I simply want to report on the different fields in different tables. 

 

So report would contain all incidents - Ticket Type = Service Request

and RITM - Item = Laptop replacement

Shahebaz2
Kilo Contributor

Hi David,

could please let us know what exactly your SQL query which you might write in the "Where Clause" of View table?

Thanks

Hi Shahebaz, 

There is out of box database view written on incident table, you can refer it for your use.

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP