The CreatorCon Call for Content is officially open! Get started here.

Show a Change Record's Affected CIs on the Change Task Affected CI List

Joshua Cassity
Kilo Guru

OOTB the Affected CIs on both the Change Record and the Change Task only look at their current record to display all the affected ci records. We'd like to do one of the following:

1. The Easy Solution (hopefully): Simply create a new Related List called 'Change Affected CI' or something similar that would be placed on the Change Task to provide a listing of all CIs from the task_ci table where the task number = the parent change number.

2. The Permanent Solution (probably a lot harder): Create some kind of Business Rule that would 'sync' the affected CIs for both the Change Task and for the parent Change Record

We've never done either of the above in our limited experience with the system. Any guidance would be greatly appreciated.

Thanks guys.

1 ACCEPTED SOLUTION

Aditya Mallik
ServiceNow Employee
ServiceNow Employee

Easiest way to do this is to create a relationship between change_task table and task_ci table. In this relationship you can define your own query.



Navigation would be:


1. System Definition -> Relationships -> New


2. Refer to the attached screen shot and attached XML for the sample / possible relationship that would suite your requirement. You can import the attached XML file, instead of manually creating the definition yourself. We are essentially querying for all task_ci records based on the change_task.parent which would be the change request number in this case. That would ensure all the associated CIs for the change_request would get displayed along with any of the CIs associated with other child tasks.


3. Go to the Change Tasks form, and do a Configure -> Relates Lists. Select the newly created relationship.


4. The related list will start showing up. Configure the columns of the related list as required.



In my opinion writing a "sync" script is an overkill and prone to performance issues.



find_real_file.png




find_real_file.png




find_real_file.png




Thanks.


View solution in original post

4 REPLIES 4

Aditya Mallik
ServiceNow Employee
ServiceNow Employee

Easiest way to do this is to create a relationship between change_task table and task_ci table. In this relationship you can define your own query.



Navigation would be:


1. System Definition -> Relationships -> New


2. Refer to the attached screen shot and attached XML for the sample / possible relationship that would suite your requirement. You can import the attached XML file, instead of manually creating the definition yourself. We are essentially querying for all task_ci records based on the change_task.parent which would be the change request number in this case. That would ensure all the associated CIs for the change_request would get displayed along with any of the CIs associated with other child tasks.


3. Go to the Change Tasks form, and do a Configure -> Relates Lists. Select the newly created relationship.


4. The related list will start showing up. Configure the columns of the related list as required.



In my opinion writing a "sync" script is an overkill and prone to performance issues.



find_real_file.png




find_real_file.png




find_real_file.png




Thanks.


The sample relationship definition xml file is attached.


Thanks. That got me what I needed. Not ever building one of these before it was a little confusing to try to figure out which tables were being referenced by current / parent but it now seems that parent is the applies to table and the current is the table being queried from.



Is that an accurate statement?


Current is what is specified in "Queries form table" and parent is what is specified in "Applies to table".