<?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 to differentiate attached file depends on Revision</title><link>https://www.aras.com/community/f/getting-started/3834/how-to-differentiate-attached-file-depends-on-revision</link><description>Hi,

I have a document, which is in revision B , Now I want to differentiate files which are attached when a document is in Revision A and in Revision B .

I try to visible created_on property which is on &amp;quot; Document File &amp;quot; relationship ItemType so that</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to differentiate attached file depends on Revision</title><link>https://www.aras.com/community/thread/1835?ContentTypeID=1</link><pubDate>Tue, 24 Jul 2018 00:57:33 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:3c5209cd-072e-4224-9776-365d87dd757d</guid><dc:creator>Maddy</dc:creator><description>Thank you Eli for a reply.

I will try the first approach which you have shared i.e try to add a version of the parent item.

&amp;nbsp;

Regards,

Maddy.

&amp;nbsp;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to differentiate attached file depends on Revision</title><link>https://www.aras.com/community/thread/1834?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 14:08:12 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:fb68ba30-d768-475d-86e1-22b7067467b9</guid><dc:creator>Eli Donahue</dc:creator><description>Hi Maddy,

When a parent item is versioned, new relationship items are created to link the parent item with its related items. That&amp;#39;s why the created_on date of a versioned item&amp;#39;s relationships may match the parent item&amp;#39;s created_on date - even if the related items were added to a previous version. The following diagram shows how this works with the Part BOM relationship:

&lt;img src="http://community.aras.com/wp-content/uploads/2018/07/versioning.png" alt=" " /&gt;

You can see that v1 of the Part has a relationship to Part 023. When v2 of the parent Part is created, a new Part BOM relationship is added so both v1 and v2 of the parent Part can reference Part 023.

Regarding your use case, there are a few options. If you want the relationship grid to show which version of the parent item was originally linked to the related item, you can use a custom field and OnInsertRow grid event. The following sample code will get the major rev and generation of the parent item and set it on the relationship&amp;#39;s custom field. Whenever the parent is versioned, the value will be copied to the new relationship item.
&lt;pre&gt;var parentItem = parent.thisItem;
var linked_version = parentItem.getProperty(&amp;quot;major_rev&amp;quot;,&amp;quot;&amp;quot;) + &amp;quot;.&amp;quot; + parentItem.getProperty(&amp;quot;generation&amp;quot;,&amp;quot;&amp;quot;);
setRelationshipProperty(relationshipID, &amp;lt;custom property name&amp;gt;, linked_version);&lt;/pre&gt;
Note that this approach will not set a value for related items added via code - only items added via the Innovator web client. It would be possible to implement the same behavior via server events, but it&amp;#39;s not as easy.

If users just need to find the earliest version of a parent item but it doesn&amp;#39;t need to be displayed in the grid, they can use the where used dialog. Just right click on the related item in the grid and select &lt;strong&gt;View &amp;lt;Related ItemType&amp;gt;&lt;/strong&gt;. When the related item opens, select &lt;strong&gt;Views &amp;gt; Where Used&lt;/strong&gt; from the main menu. The resulting view will show any items that are related to the current item - including the versions of the parent items.

Hope this helps!

Eli

&lt;hr /&gt;

Eli Donahue

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