What incident was used to create the Change request.

awyatt
Kilo Contributor

The change request table doesn't seem to have a relationship with the incident table that will provide the incident that created the change(incident elevated to change not using a problem). And/or all incidents that will be solved by the change. I attempted to use the "related incident" field in the change request table. But it's null when even when there is an incident that will be solved by the change. I don't think I understand the tables and there columns. Is the a definition resource somewhere to explain the contents of the fields and there meanings or are we to just use the field name and schema map?

Thanks for any help

Alan  

1 ACCEPTED SOLUTION

A database view can involve more than two tables.   In this case you simply need to create a database view between the change request and incident table that uses the Change field on the incident table to "join" to the sys_id field in the change request table.   Make sure its a left join with the change request table on the left.



Create a database view



You can add as many tables as you want.   just remember reference fields used to link to the table they point at use the sys_id column in the referenced table.


View solution in original post

16 REPLIES 16

Hi Drew,



I am assumin gyou are sinply looking for an association of what INC are related to a change correct?


awyatt
Kilo Contributor

Thanks for the help Drew. I don't know where to access the code for creating a change request. We use the top left form menu in the incident form view and select create normal change, OOB functionality. Not sure code is accessible.


That would make it a UI Action on the incident table and it is access able to an Admin.



We customized ours long ago so I have no idea what the out of box one looks like.   If memory serves ServiceNow does not not relate the change back to the incident, they just relate the incident to the change request.   But don't quote me on that.



You could create a database view between the Change field on the incident table and the change request table.


Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Hi Alan,



Hold on here. There is already a relationship between incident and change. If you go to an incident and choose for example "Create Normal Change" from the context menu a change request is created. If you go back to the incident you can see the change here:



find_real_file.png



If you go to the change request, you should oob have a related list like this:


find_real_file.png



If you dont have it, you can choose configure -> related list and this is the one :


find_real_file.png


Right and that's exactly what were doing to relate an incident to an change. However, if I go to the reports and try to create a report of all "change_request"   and include a field with the "incident.number" I can't find the field. Which is what I want to do.



With what you explained I can look at each change form one-by-one and get the related incident. But I need to get a report of all changes and the related incident so I don't have to go thru them one by one.




Thanks for your help.



Alan