Forum Discussion

Ashok_Yadav's avatar
Ashok_Yadav
Creator II
4 years ago

BOM Editing issue

Hello Guys,

I want update Part BOM Quantity  By Nash Tool.

Using below AML .

<AML>
<Item type="Part BOM" action="edit" where="related_id=(select id FROM innovator.Part WHERE ITEM_NUMBER='424-01-00001' and IS_CURRENT='1') ">
<quantity>9</quantity>
</Item>
</AML>

But  I am not able update Quantity . I am getting below error message.

-<SOAP-ENV:Envelope>
-<SOAP-ENV:Body>
-<SOAP-ENV:Fault>
 <faultcode>SOAP-ENV:Server.ItemAnalysisException</faultcode>
 <faultstring>Item Analysis Error. Some Items have incorrect attribute/property values syntax. See details for more information. Details: Incorrect value: "where="related_id=(select id FROM innovator.Part WHERE ITEM_NUMBER='424-01-00001' and IS_CURRENT='1') "". Incorrect value explanation: "select" is forbidden in where attribute. Incorrect value: "where="related_id=(select id FROM innovator.Part WHERE ITEM_NUMBER='424-01-00001' and IS_CURRENT='1') "". Incorrect value explanation: Item hasn't property referred to column with name "ITEM_NUMBER" </faultstring>
-<detail>
 <af:legacy_detail>Item Analysis Error. Some Items have incorrect attribute/property values syntax. See details for more information. Details: Incorrect value: "where="related_id=(select id FROM innovator.Part WHERE ITEM_NUMBER='424-01-00001' and IS_CURRENT='1') "". Incorrect value explanation: "select" is forbidden in where attribute. Incorrect value: "where="related_id=(select id FROM innovator.Part WHERE ITEM_NUMBER='424-01-00001' and IS_CURRENT='1') "". Incorrect value explanation: Item hasn't property referred to column with name "ITEM_NUMBER" </af:legacy_detail>
 <af:exception message =" Item Analysis Error. Some Items have incorrect attribute/property values syntax. See details for more information. Details: Incorrect value: "where="related_id=(select id FROM innovator.Part WHERE ITEM_NUMBER='424-01-00001' and IS_CURRENT='1') "". Incorrect value explanation: "select" is forbidden in where attribute. Incorrect value: "where="related_id=(select id FROM innovator.Part WHERE ITEM_NUMBER='424-01-00001' and IS_CURRENT='1') "". Incorrect value explanation: Item hasn't property referred to column with name "ITEM_NUMBER" " type =" Aras.Server.Core.ItemAnalysisException " />
 </detail>
 </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>
Can you please help me ?
Regards
Ashok Kumar Yadav

9 Replies

  • Hi,

    this error message is a good hint:

     Incorrect value explanation: "select" is forbidden in where attribute

    What you want to do is not possible anymore in newer Aras version due to security restrictions:

    https://community.aras.com/f/development/6266/error-when-sql-is-specified-in-where-attribute-in-aml

    https://community.aras.com/f/development/3839/error-in-aml

    You can customize Aras to allow your specific query. But if you really just want to modify a small amount of items, it´s easier to search for the related_id directly and use this one.

    • Ashok_Yadav's avatar
      Ashok_Yadav
      Creator II

      Hello Angelalp,

      Thank you for your reply.

      Please suggest me. How can i  customize ItemAnalysis.Suppressions.xml for mapping my requirement ?

      I  try below. but it is not work. please suggest me.

      Regards

      Ashok Kumar Yadav

      • angela's avatar
        angela
        Catalyst II

        Hi,

        since all my years in Innovator I never was forced to use this file. Normally there is always a way to avoid these kind of queries.

        According to the xml, you have to create a copy of this template.

        I assume you have to but your custom query into the <whereAttribute> tag inside CDATA:

        <whereAttribute>
        <!-- Add a suppression for Item "where" attribute. NOTE: it uses both @Parameter and @ParametersList -->
        <template><![CDATA[

        [Part BOM].related_id=(select id FROM innovator.Part WHERE ITEM_NUMBER='424-01-00001' and IS_CURRENT='1')

        ]]></template>
        </whereAttribute>

        Maybe this is already enough to make your AML query work.