<?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: Related List in Users for their RITMs in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/related-list-in-users-for-their-ritms/m-p/2851585#M1091299</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/75839"&gt;@VernYerem&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No need to create a new relationship here, use the &lt;STRONG&gt;Requested Item &amp;gt; Requested For&amp;nbsp;&lt;/STRONG&gt;from the available list.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesChun_0-1709686644697.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/336209i225B07ED64B48812/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesChun_0-1709686644697.png" alt="JamesChun_0-1709686644697.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
    <pubDate>Wed, 06 Mar 2024 00:57:56 GMT</pubDate>
    <dc:creator>James Chun</dc:creator>
    <dc:date>2024-03-06T00:57:56Z</dc:date>
    <item>
      <title>Related List in Users for their RITMs</title>
      <link>https://www.servicenow.com/community/developer-forum/related-list-in-users-for-their-ritms/m-p/2851316#M1091222</link>
      <description>&lt;P&gt;Hello! Looking to add a related list to Users to show what RITMs they've requested. Creating the Relationship and adding it to users is easy enough. But it looks like I need to add "Query with" in the relationship, otherwise it just shows all RITMs in the related list within the user record.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe I'll need to query the RTIMs "requested for", but kind of lost from there. Any guidance would be great!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 19:05:09 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/related-list-in-users-for-their-ritms/m-p/2851316#M1091222</guid>
      <dc:creator>VernYerem</dc:creator>
      <dc:date>2024-03-05T19:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Related List in Users for their RITMs</title>
      <link>https://www.servicenow.com/community/developer-forum/related-list-in-users-for-their-ritms/m-p/2851577#M1091297</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/75839"&gt;@VernYerem&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you need to create a new relationship and add query on the&amp;nbsp; requested for field. The OOB field uses requested_for&lt;/P&gt;&lt;P&gt;Check your RITM or REQ for the correct user field and add this line to the query&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;current.addQuery(&lt;/SPAN&gt;&lt;SPAN&gt;'requested_for'&lt;/SPAN&gt;&lt;SPAN&gt;, parent.requested_for);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eagle18_0-1709686128425.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/336202i809730636B6849B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="eagle18_0-1709686128425.png" alt="eagle18_0-1709686128425.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eagle18_2-1709686161270.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/336204iAF9FF1C7F75BB9E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="eagle18_2-1709686161270.png" alt="eagle18_2-1709686161270.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this helps. Please mark the answer as correct/helpful if this solves your issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 00:53:51 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/related-list-in-users-for-their-ritms/m-p/2851577#M1091297</guid>
      <dc:creator>eagle18</dc:creator>
      <dc:date>2024-03-06T00:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Related List in Users for their RITMs</title>
      <link>https://www.servicenow.com/community/developer-forum/related-list-in-users-for-their-ritms/m-p/2851585#M1091299</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/75839"&gt;@VernYerem&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No need to create a new relationship here, use the &lt;STRONG&gt;Requested Item &amp;gt; Requested For&amp;nbsp;&lt;/STRONG&gt;from the available list.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesChun_0-1709686644697.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/336209i225B07ED64B48812/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesChun_0-1709686644697.png" alt="JamesChun_0-1709686644697.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 00:57:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/related-list-in-users-for-their-ritms/m-p/2851585#M1091299</guid>
      <dc:creator>James Chun</dc:creator>
      <dc:date>2024-03-06T00:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Related List in Users for their RITMs</title>
      <link>https://www.servicenow.com/community/developer-forum/related-list-in-users-for-their-ritms/m-p/2851600#M1091300</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/75839"&gt;@VernYerem&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ou can use "Defined Related List" for your requirement. You can follow below steps&lt;/P&gt;&lt;P&gt;Goto System Definition &amp;gt; Relationships&lt;/P&gt;&lt;P&gt;Click New&lt;/P&gt;&lt;P&gt;Set valid name for your related list&lt;/P&gt;&lt;P&gt;Set Applies to table as sc_request table&lt;/P&gt;&lt;P&gt;Set Queries from table as sys_user table&lt;/P&gt;&lt;P&gt;Use the below code in "Query with"&lt;/P&gt;&lt;PRE&gt;var group = [];
var grTask = new GlideRecord("sc_task");
grTask.addQuery("request_item",parent.sys_id);
grTask.query();
while(grTask.next()){
  group.push(grTask.assignment_group.sys_id.toString());
}

var users = [];
var grUser = new GlideRecord("sys_user_grmember");
grUser.addEncodedQuery("groupIN" + group.join(","));
grUser.query();
while(grUser.next()){
  users.push(grUser.user.sys_id.toString());
}
current.addEncodedQuery("sys_idIN"+users.join(","));&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Thanks &amp;amp; Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Sumanth Meda&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 01:23:21 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/related-list-in-users-for-their-ritms/m-p/2851600#M1091300</guid>
      <dc:creator>Sumanth16</dc:creator>
      <dc:date>2024-03-06T01:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Related List in Users for their RITMs</title>
      <link>https://www.servicenow.com/community/developer-forum/related-list-in-users-for-their-ritms/m-p/2853107#M1091830</link>
      <description>&lt;P&gt;Ah! Best answer, it's already there and I was searching for the incorrect terms. Thanks&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/594931"&gt;@James Chun&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 21:51:09 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/related-list-in-users-for-their-ritms/m-p/2853107#M1091830</guid>
      <dc:creator>VernYerem</dc:creator>
      <dc:date>2024-03-06T21:51:09Z</dc:date>
    </item>
  </channel>
</rss>

