<?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 check the value of State in BOM tab of Part?</title><link>https://www.aras.com/community/f/development/3901/how-to-check-the-value-of-state-in-bom-tab-of-part</link><description>Hi Expert,

When I add components in BOM tab of a part, I need to check &amp;#39;State&amp;#39; of&amp;#160; each components added using Grid Events in RelationshipType of a Part.

Event is &amp;#39;OnInsertRow&amp;#39;.

When I click &amp;#39;+&amp;#39; button and pick a component, javascript needs to capture</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to check the value of State in BOM tab of Part?</title><link>https://www.aras.com/community/thread/2005?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 00:51:13 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:2fdfb541-fac0-45e1-a4aa-398a2f5d5638</guid><dc:creator>Joseph An</dc:creator><description>Hi Chris,

&amp;nbsp;

Thank you for you reply.

I could solve the issue that I have using your information.

Thank you.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check the value of State in BOM tab of Part?</title><link>https://www.aras.com/community/thread/2004?ContentTypeID=1</link><pubDate>Mon, 27 Aug 2018 11:38:51 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:ab96e3df-faac-4c78-977b-c080f8f28150</guid><dc:creator>Christopher Gillis</dc:creator><description>Hello,

Could you please include which version of Aras Innovator you are using? I ran a quick test in 11.0 SP12, and found that the onInsertRow event was called individually for each relationship even if I added multiple Parts at once.

Additionally, you can more directly check for the state of the related part by using the sample below.

&lt;pre&gt;&lt;code&gt;var relatedNd = parent.thisItem.node.selectSingleNode(&amp;quot;//Item[@id=&amp;#039;&amp;quot; + relatedID + &amp;quot;&amp;#039;]&amp;quot;);
var relatedState = aras.getItemProperty(relatedNd, &amp;quot;state&amp;quot;);
if (relatedState == &amp;quot;Preliminary&amp;quot;) {
// Run additional logic here
}&lt;/code&gt;&lt;/pre&gt;


Chris

&lt;hr /&gt;

Christopher Gillis

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