Need a report

Soni Rahul
Tera Contributor

Hi ServiceNow Team,
I have a requirement to create a report on sysapproval_approver table for only RITM's(sc_req_item) records where I can be able to see the request variable information as well, like if we have one request for "Request for ServiceNow group" and if there is variable" Target group name" inside it then my report should look like this.

 

State               Approval for           Target group name
Requested         RITM00001          Network


To achieve this requirement, I have created the database view to add this 2 tables (sysapproval_approver, sc_req_item) with this query "ap_sysapproval=sc_sys_id" where ap is the sysapproval_approver prefix and sc is the sc_req_item prefix, after creating this database view I am not able to see the variable information which we can see in sc_req_item table while creating the report.


Please help how I can create the report.

Thanks.

9 REPLIES 9

Chaitanya ILCR
Kilo Patron

Hi @Soni Rahul ,

for variable information you have to combine 2 more tables

 

sc_item_option_mtom

sc_item_option

 

you will be able to figure out how to do once you open those tables

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

Hi Chaitanya,
This was helpful and now I am able to create a report for my requirement, but the thing is that the group name which I need in my report is a reference field in my RITM and in this "sc_item_option_mtom" it is storing as sys id in value field, any way I can get the name of group instead of sys id.

Thanks

Hi @Soni Rahul ,

try these options

1. you can create one more variable on the catalog item to store the name of the group 

2. you can include group table in the database view ðŸ˜€

 

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

Hi Chaitanya,

From your second option, can we link the 2 table with that field which is not a reference to anyone?
As value field is not a reference field it's just a text field, can I link group table with this field?

Thanks