Fetch the parent catalog item variable

pavi890pati
Tera Contributor

create report where it has the data in sc_req_item table i need to create report on child RITM and fetch the variables from parent RITM how i can achieve it (parent is reference to child item)

4 REPLIES 4

pr8172510
Tera Guru

 

Hi @pavi890pati ,

You can achieve this by creating a Database View between Child RITM, Parent RITM, and Variable tables.

pr8172510_0-1778239278703.png

 

Steps:

  1. Create DB View:

 

 
u_child_ritm_with_parent_variables
 

 

  1. Add tables in this order:
Table Prefix Order Where Clause
sc_req_itemchild100
sc_req_itemparent200child.parent = parent.sys_id
sc_item_option_mtommtom300mtom.request_item = parent.sys_id
sc_item_optionoption400option.sys_id = mtom.sc_item_option
  1. Add required fields from:
  • child RITM
  • parent RITM
  • variable tables
  1. Click:

 

 
Try It
 

 

  1. Create report on DB View:

 

 
u_child_ritm_with_parent_variables
 

This will allow you to report on Child RITM while fetching variables from Parent RITM.

Also, alternatively you can use:

  • Flow Designer
  • Business Rule

to copy parent variables into child RITM fields and create report directly on sc_req_item.





Rocky14
Tera Contributor

@pavi890pati 

Both DB View and Business Rule approaches can achieve this requirement. However, the Business Rule approach is easier to implement and provides better scalability compared to the DB View approach.

 

If the response helped address your question, please mark it as Helpful and Accept it as the Solution.

Ankur Bawiskar
Tera Patron

@pavi890pati 

check these

Databases view by request item and service catalog (variable) 

Report on Item Variables in the Service Catalog with a Database View 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Tanushree Maiti
Giga Patron

Hi @pavi890pati 

 

Refer this article: Two ways (Database View and Variable config) to create Catalog Item variable report

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: