How to create Database view between Catalog Task and Asset Table

SourabhAkiwate
Tera Expert

Hello All,

I have requirement that create report on, which assets has been assigned to user who is Requested for from catalog task table.

Could you please help me out to create report through script or through Database view ?

 

Thank you,

Sourabh A

1 ACCEPTED SOLUTION

Robert H
Mega Sage

Hello @SourabhAkiwate ,

As others have pointed out, there is no "Requested for" field on the Catalog Task table. I am going to assume you mean the "Requested for" of the RITM.

This is how your Database View would need to be configured to achieve that:

RobertH_0-1743071092064.png

It will give you something like this:

RobertH_1-1743071121640.png

 

Or, if you really need that report to be based on the Catalog Tasks, you would need to join all three tables, like this:

RobertH_0-1743071687008.png

RobertH_1-1743071756837.png

 

Regards,

Robert

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@SourabhAkiwate 

on catalog task where are you storing the asset? some custom field or OOB one?

If yes then you can join sc_task table and alm_asset table

what did you start with and where are you stuck?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Brad Bowman
Kilo Patron
Kilo Patron

Requested for is not a field on the Catalog Task table.  Are you viewing the field from the Request (sc_request) or Requested Item (sc_req_item) table on your Catalog Task form, or do you have a custom field on the sc_task table?  If you are viewing from one of the other tables, in the report do you need to see fields from sc_task specifically (like Catalog Task number), or will a join on whichever (RITM or REQ) show you the fields you need?

SourabhAkiwate
Tera Expert

Hello @Ankur Bawiskar ,

We are not storing asset on sc_task table.

Actually I need a report on : Assets owned by requested for (catalog task) table.

 

@SourabhAkiwate 

you can join sc_req_item and alm_asset as per @Robert H 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader