<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: List of CI.s  Upstream and downstream in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/list-of-ci-s-upstream-and-downstream/m-p/3478834#M553751</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/54120"&gt;@pramn&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;In ServiceNow, all CI relationships are stored in the &lt;STRONG&gt;CI Relationship&lt;/STRONG&gt; table (cmdb_rel_ci).&lt;BR /&gt;Whenever a relationship is created between two CIs, the platform automatically inserts a record into this table with:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;a &lt;STRONG&gt;Parent CI&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;a &lt;STRONG&gt;Child CI&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;and the &lt;STRONG&gt;Relationship Type&lt;/STRONG&gt; (e.g., &lt;EM&gt;Depends on&lt;/EM&gt;, &lt;EM&gt;Contains&lt;/EM&gt;, etc.)&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;H3&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; &lt;STRONG&gt;Creating a Report&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;If your requirement is to report on upstream/downstream CIs, you can build a report directly on the &lt;STRONG&gt;cmdb_rel_ci&lt;/STRONG&gt; table.&lt;BR /&gt;To get all CIs related to a specific parent CI, set:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Table&lt;/STRONG&gt;: cmdb_rel_ci&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Group By&lt;/STRONG&gt;: &lt;EM&gt;Parent&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;Apply filters as needed.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This will give you a list of all child CIs related to each parent CI.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;H3&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; &lt;STRONG&gt;Retrieving Child CIs via Script&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;If you want to programmatically list the child CIs and print their names in the logs, you can use the following script:&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;var gr = new GlideRecord('cmdb_rel_ci');
gr.addQuery('parent','14bca7efdb0c10104779141b13961998');//the sys_id of parent CI .
var count = 0;
gr.query();
while(gr.next()){
	count++;
	gs.print ('The Child name ' +gr.child.name+' is '+count+' th child');
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;This script loops through all relationship records where the specified CI is the &lt;STRONG&gt;parent&lt;/STRONG&gt;, counts them, and prints each child CI’s name and order.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If this solution helps, please mark it as &lt;STRONG&gt;Helpful&lt;/STRONG&gt; and &lt;STRONG&gt;Accept the Solution&lt;/STRONG&gt; to close the thread.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Sagnic&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 30 Jan 2026 19:07:37 GMT</pubDate>
    <dc:creator>Its_Sagnic</dc:creator>
    <dc:date>2026-01-30T19:07:37Z</dc:date>
    <item>
      <title>List of CI.s  Upstream and downstream</title>
      <link>https://www.servicenow.com/community/itsm-forum/list-of-ci-s-upstream-and-downstream/m-p/3478769#M553743</link>
      <description>&lt;P&gt;Hi Mates,&amp;nbsp;&lt;/P&gt;&lt;P&gt;one of my clients needs for reporting purpose List of CI.s&amp;nbsp; Upstream and downstream data ..&lt;/P&gt;&lt;P&gt;Is there any possibility to get those data .&lt;/P&gt;&lt;P&gt;or need to write any scripting .&lt;/P&gt;&lt;P&gt;Need your help !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2026 16:55:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/list-of-ci-s-upstream-and-downstream/m-p/3478769#M553743</guid>
      <dc:creator>pramn</dc:creator>
      <dc:date>2026-01-30T16:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: List of CI.s  Upstream and downstream</title>
      <link>https://www.servicenow.com/community/itsm-forum/list-of-ci-s-upstream-and-downstream/m-p/3478774#M553744</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/54120"&gt;@pramn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.servicenow.com/community/itsm-forum/ability-to-export-all-upstream-and-downstream-ci-s-for-a/m-p/519983" target="_blank"&gt;https://www.servicenow.com/community/itsm-forum/ability-to-export-all-upstream-and-downstream-ci-s-for-a/m-p/519983&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.servicenow.com/community/itom-forum/how-to-get-data-cmdb-ci-upstream-and-downstream-data-in-audit/m-p/3333020" target="_blank"&gt;https://www.servicenow.com/community/itom-forum/how-to-get-data-cmdb-ci-upstream-and-downstream-data-in-audit/m-p/3333020&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.servicenow.com/community/platform-analytics-forum/hi-all-is-there-a-way-to-report-on-the-quot-upstream-downstream/m-p/1279254" target="_blank"&gt;https://www.servicenow.com/community/platform-analytics-forum/hi-all-is-there-a-way-to-report-on-the-quot-upstream-downstream/m-p/1279254&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2026 17:07:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/list-of-ci-s-upstream-and-downstream/m-p/3478774#M553744</guid>
      <dc:creator>Dr Atul G- LNG</dc:creator>
      <dc:date>2026-01-30T17:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: List of CI.s  Upstream and downstream</title>
      <link>https://www.servicenow.com/community/itsm-forum/list-of-ci-s-upstream-and-downstream/m-p/3478834#M553751</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/54120"&gt;@pramn&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;In ServiceNow, all CI relationships are stored in the &lt;STRONG&gt;CI Relationship&lt;/STRONG&gt; table (cmdb_rel_ci).&lt;BR /&gt;Whenever a relationship is created between two CIs, the platform automatically inserts a record into this table with:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;a &lt;STRONG&gt;Parent CI&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;a &lt;STRONG&gt;Child CI&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;and the &lt;STRONG&gt;Relationship Type&lt;/STRONG&gt; (e.g., &lt;EM&gt;Depends on&lt;/EM&gt;, &lt;EM&gt;Contains&lt;/EM&gt;, etc.)&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;H3&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; &lt;STRONG&gt;Creating a Report&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;If your requirement is to report on upstream/downstream CIs, you can build a report directly on the &lt;STRONG&gt;cmdb_rel_ci&lt;/STRONG&gt; table.&lt;BR /&gt;To get all CIs related to a specific parent CI, set:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Table&lt;/STRONG&gt;: cmdb_rel_ci&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Group By&lt;/STRONG&gt;: &lt;EM&gt;Parent&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;Apply filters as needed.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This will give you a list of all child CIs related to each parent CI.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;H3&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; &lt;STRONG&gt;Retrieving Child CIs via Script&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;If you want to programmatically list the child CIs and print their names in the logs, you can use the following script:&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;var gr = new GlideRecord('cmdb_rel_ci');
gr.addQuery('parent','14bca7efdb0c10104779141b13961998');//the sys_id of parent CI .
var count = 0;
gr.query();
while(gr.next()){
	count++;
	gs.print ('The Child name ' +gr.child.name+' is '+count+' th child');
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;This script loops through all relationship records where the specified CI is the &lt;STRONG&gt;parent&lt;/STRONG&gt;, counts them, and prints each child CI’s name and order.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If this solution helps, please mark it as &lt;STRONG&gt;Helpful&lt;/STRONG&gt; and &lt;STRONG&gt;Accept the Solution&lt;/STRONG&gt; to close the thread.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Sagnic&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 30 Jan 2026 19:07:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/list-of-ci-s-upstream-and-downstream/m-p/3478834#M553751</guid>
      <dc:creator>Its_Sagnic</dc:creator>
      <dc:date>2026-01-30T19:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: List of CI.s  Upstream and downstream</title>
      <link>https://www.servicenow.com/community/itsm-forum/list-of-ci-s-upstream-and-downstream/m-p/3479389#M553772</link>
      <description>&lt;P&gt;HI,&amp;nbsp;&lt;/P&gt;&lt;P&gt;This script is not printing the records , looks like its executing .&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pramn_0-1770004799535.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/499103iF887CAE4A2F16255/image-size/medium?v=v2&amp;amp;px=400" alt="pramn_0-1770004799535.png" title="pramn_0-1770004799535.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Feb 2026 04:00:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/list-of-ci-s-upstream-and-downstream/m-p/3479389#M553772</guid>
      <dc:creator>pramn</dc:creator>
      <dc:date>2026-02-02T04:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: List of CI.s  Upstream and downstream</title>
      <link>https://www.servicenow.com/community/itsm-forum/list-of-ci-s-upstream-and-downstream/m-p/3479843#M553801</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/54120"&gt;@pramn&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Is it possible to share the code that you used in your case..&lt;BR /&gt;&lt;BR /&gt;Because in the 2 nd line of the code I mentioned that you need to replace the sys_id of the parent with your Ci's sys_id&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;gr.addQuery('parent','14bca7efdb0c10104779141b13961998');//the sys_id of parent CI .&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Feb 2026 14:49:22 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/list-of-ci-s-upstream-and-downstream/m-p/3479843#M553801</guid>
      <dc:creator>Its_Sagnic</dc:creator>
      <dc:date>2026-02-02T14:49:22Z</dc:date>
    </item>
  </channel>
</rss>

