The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to get parent ci

pradeepgupta
Giga Expert

Hi All,

There are CI A,B,C & D with below relationship.

kb.png

I have to write a function in such a way that if I give ci D than function should return a result as array or   all the ci (A,B,C,D).

1 ACCEPTED SOLUTION
13 REPLIES 13

I got your script working to populate the Impacted Services table as desired, but how on your end are you organizing this information to a report by joining to cmdb_rel_ci? Ideally I'd like some sort of high level report going to show umbrella business services and the incidents that fall below them in related other business services.



Thanks.


I don't do that on my end.   I think what you're really after is what services are impacted (and who owns them).   That can all be had via the Impacted Services table.   Understanding the relationships is best viewed through the associated BSM map in my opinion.   You could attempt to join to 'cmdb_rel_ci' and show the parent/child right in the table but I don't think it's particularly useful or necessary.


Thanks Mark, this has helped me tremendously.



For your information I tried replying to your script include thread » Walking the ServiceNow CMDB Relationship Tree but kept getting an error about cookies/javascript being disabled. I tried this in IE11 and Chrome. In the end I just replied to your on this forum instead. Thought you might want to know!



Cheers.


Hi Shane,



Could you please let me know the steps used to retrieve all the directly affected and indirectly affected services for a CI.



Thanks