Dependency view map to display parent child relationship

chakings22
Mega Contributor

Hi All,

We are using the OOTB managed documents application in our organisation. The main table dms_document has a parent field having a reference to itself. So any document can be linked to the current document record. 

We are trying to see the upstream and downstream relationship of these related documents in a map similar to the Dependency view map for CIs. 

Any help is appreciated. 

Regards,

Maria Charles

 

 

4 REPLIES 4

DaveHertel
Kilo Sage
Kilo Sage

Hi  - relationships in CMDB are all stored in the CMDB_REL_CI table, hence if your document can query this table and parse Parent & Child fields within a relationship record (that form a given relation), and then perhaps you could programmatically query this table and view relationships in a similar manner as those seen in the dependency maps...

Hope this helps?

Hi Dave,

Thankyou for your input.

In out dms_document table, we have created a custom reference field u_ci referring to the cmdb_ci table. Whenever we create a new document record, adding a new record into the cmdb_ci_service table and linking that new CI to our u_ci custom field in the document record by an after update business rule. I am working on a script to populate the cmdb_rel_ci table as you have suggested. When we click on the map icon we see the map.

How to programmatically querying this table. I dont understand that part. 

Regards,

Maria Charles

Hello -- I'm assuming you are doing this work with glide scripting/queries?  I'm unfamiliar with the dms_document table that you mentioned but I'm making a leap of faith that someone your approach is using glide query's of system table to get the data it needs.

For examples of how to build glide query's check out this post and view Mark Stangers code example.  Conceptually, you could do something kinda like that to query CMDB_REL_CI relationship table to get relations like those found on a dependency map.

Hope this helps?

Max20
ServiceNow Employee
ServiceNow Employee