How to populate CI'S parent Class and Child classes in custom table CMDB

taylor13
Tera Contributor

Hello Team,

I'm New to ServiceNow. I have created 3 fields one is reference to cmdb_ci table and based on selected CI I want to Populate all parent CI and Child CI two different Fields and both are List collector field. can any one help me.

 

@anillande

@ankurbawiskar

7 REPLIES 7

AndersBGS
Tera Patron
Tera Patron

Hi @taylor13 ,

 

There is no reason to create a custom table to retrieve the parent CI and Class together with the Child CI and Class.

Instead you can utilize the table: cmdb_rel_ci with the following fields:

AndersSkovbjer_0-1676964205164.png

 

Hence you can extract data as shown below:

 

AndersSkovbjer_1-1676964254372.png

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards

Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

Hello,

Thanks for the feedback.

as you can see in the below image i want to populate parent Ci and Child CI of select CI.

can you help me?

taylor13_0-1676986878307.png

 

Hi @taylor13 ,

 

So you would like to e.g. have all (if more) parent CIs populated to the "Parent CI" field?

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards

Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

Hello Its not business requirement.

I am new to CMDB I have created 3 fields

1)Selected CI (Ref) -- Cmdb_ci

2)List Collector - Parent CI

3)List Collector - Child CI

 

SO, on basis of selected CI selection I want populate the parent CI,Child CI related to that CI

can you help how to populate?