<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How do I get the selected Item Content?</title><link>https://www.aras.com/community/f/development/6692/how-do-i-get-the-selected-item-content</link><description>When I place [0] in ar partListId = partList[0].childNodes[0].getAttribute(&amp;quot;id&amp;quot;); I get the FIRST item in the relationship and if I put ( [1],[2], etc I get the next items in the list) What do I need to do to get the active (selected) item for the child</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: How do I get the selected Item Content?</title><link>https://www.aras.com/community/thread/4132?ContentTypeID=1</link><pubDate>Mon, 23 Dec 2019 20:00:05 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:bf124ccf-e249-4da2-ac4d-02aa158d0934</guid><dc:creator>Gopikrishnan</dc:creator><description>&lt;p&gt;&lt;strong&gt;Hi Ddidonato&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can get the selected item ids using below code. You can iterate over the result and get the related items.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;var topwindow = top.aras.getMostTopWindowWithAras(window);&lt;br /&gt;var relationship = topwindow.relationships;&lt;br /&gt;var currentTabId = relationship.currTabID;&lt;br /&gt;var relationshipsGrid = relationship.iframesCollection[currentTabId].contentWindow.grid;&lt;br /&gt;var relationshipType = aras.getRelationshipTypeName(currentTabId);&lt;br /&gt;var idListIds = relationshipsGrid.getSelectedItemIds();&lt;br /&gt;var item = this.newItem(&amp;quot;&lt;span&gt;min_procure_list&amp;quot;&lt;/span&gt;,&amp;quot;get&amp;quot;);&lt;br /&gt;item.setAttribute(&amp;quot;idlist&amp;quot;,idListIds.join(&amp;#39;,&amp;#39;));&lt;br /&gt;var res = item.Apply();&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>