<?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>Reverse Lookup</title><link>https://www.aras.com/community/f/development/3663/reverse-lookup</link><description>I&amp;#39;m using &amp;quot;../Solutions/PLM/scripts/ReverseItemsGrid.html&amp;quot; on a version ItemType

I have a itemType &amp;quot;A&amp;quot; that is in Rev-A Gen-1. If I open ItemType &amp;quot;B&amp;quot; and add relationship from (ItemType-A, Rev-A, Gen-1) the &amp;quot;ReverseItemsGrid.html&amp;quot; in itemType &amp;quot;A&amp;quot; works</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Reverse Lookup</title><link>https://www.aras.com/community/thread/5847?ContentTypeID=1</link><pubDate>Fri, 23 Oct 2020 19:18:39 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:102de1c7-4073-4afc-8d9d-acbca0c2f5c8</guid><dc:creator>badgie</dc:creator><description>&lt;p&gt;This may not be an exact answer to your questions, but I came across this question while attempting to solve the following issue (11.0): in ReverseItemsGrid (and PE_GetRelatedParts) items are being returned after a relationship has been deleted from the most recent generation of the part. This seems to be because the default SQL in PE_GetRelatedParts doesn&amp;#39;t return only the most recent generation.&amp;nbsp; In order to return relationship ONLY on the most recent generation you can add another inner join to the sql ~line 158.&amp;nbsp; The reason is that the existing SQL only returns the most recent generation of MATCHING PARTS:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;String sqlQuery = @&amp;quot;&lt;br /&gt; SELECT item.id FROM {1} item&lt;br /&gt; INNER JOIN&lt;br /&gt; (&lt;br /&gt; SELECT item.CONFIG_ID, MAX(item.GENERATION) GENERATION FROM {1} item &lt;br /&gt; INNER JOIN {2} relationshipItem ON item.ID = relationshipItem.SOURCE_ID AND relationshipItem.RELATED_ID =&amp;#39;{0}&amp;#39;&lt;br /&gt; GROUP BY item.CONFIG_ID&lt;br /&gt; ) groupeditem ON groupeditem.CONFIG_ID = item.CONFIG_ID AND groupeditem.GENERATION = item.GENERATION&lt;br /&gt;/*NEW CLAUSE*/&lt;/p&gt;
&lt;p&gt;INNER JOIN (&lt;span style="font-family:inherit;"&gt;SELECT item.CONFIG_ID, MAX(item.GENERATION) GENERATION FROM {1} item&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;GROUP BY item.CONFIG_ID&lt;br /&gt; ) maxgen ON maxgen.CONFIG_ID = item.CONFIG_ID AND maxgen.GENERATION = item.GENERATION&lt;br /&gt; &amp;quot;;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reverse Lookup</title><link>https://www.aras.com/community/thread/1504?ContentTypeID=1</link><pubDate>Tue, 24 Apr 2018 10:55:24 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:9a05e59d-c036-41e6-9ced-d4275845da13</guid><dc:creator>Christopher Gillis</dc:creator><description>Hi Dominic,

There are a few different ways to accomplish this.
&lt;ol&gt;
 	&lt;li&gt;Change the behavior of the relationship to &amp;quot;Float&amp;quot; rather than &amp;quot;Fixed&amp;quot;
&lt;ul&gt;
 	&lt;li&gt;This will force the relationships to always point to the newest version of an item&lt;/li&gt;
 	&lt;li&gt;NOTE: this will also change the data you are storing which may not be desired&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
 	&lt;li&gt;Manually edit the reverse items grid
&lt;ul&gt;
 	&lt;li&gt;You can find this under \Innovator\Client\Solutions\PLM\scripts\ReverseItemsGrid.html in your codetree&lt;/li&gt;
 	&lt;li&gt;You would want to update the query near line 218 to use the config_id rather than the id&lt;/li&gt;
 	&lt;li&gt;NOTE: Rather than editing the existing ReverseItemsGrid.html, I would recommend creating a copy of the file called &amp;quot;CurrentReverseItemsGrid.html&amp;quot; that you can make your changes to&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
 	&lt;li&gt;If you are using 11.0 SP10 or greater, use the new Query Builder/Tree Grid View functionality
&lt;ul&gt;
 	&lt;li&gt;Using these new tools, you can easily create a reverse lookup query and display the grid anywhere you want&lt;/li&gt;
 	&lt;li&gt;See this demo video for more information: &lt;a href="https://www.aras.com/plm-software/?n=Aras-Innovator-Demo-Series-Query-Builder-Tree-Grid-Viewer"&gt;https://www.aras.com/plm-software/?n=Aras-Innovator-Demo-Series-Query-Builder-Tree-Grid-Viewer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
Chris

&lt;hr /&gt;

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>