Forum Discussion

dkinsley's avatar
dkinsley
Creator II
2 years ago

AML Script to Check for Two or More Released Revisions of the Same Document Number

Can someone help me search for all documents that have more than one released revision? I found a couple of these and I need to check to see if there are more of them and the document numbers.  Is there an AML script I could use?

4 Replies

  • Try this

    [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:a5d03a87-715a-4a3b-8e76-2d2d1bb45907:type=xml&text=%3CItem%20action%3D%27get%27%20type%3D%27Document%27%20select%3D%27item_number%2Ckeyed_name%27%3E%0D%0A%20%20%3Cconfig_id%20condition%3D%27in%27%3Eselect%20CONFIG_ID%20from%20innovator.DOCUMENT%20where%20STATE%3D%27Released%27%20group%20by%20CONFIG_ID%20having%20COUNT%28%2A%29%3E1%3C%2Fconfig_id%3E%0D%0A%3C%2FItem%3E]

    You need to temporary add  the

    <operating_parameter key="parse_item" value="false"/>

    to InnovatorServerConfig.xml to disable the AML secutity restrictions on the "condition='in'" expression.

    • dkinsley's avatar
      dkinsley
      Creator II

      I get this error...

      <SOAP-ENV:Envelope xmlns:SOAP-ENV="">schemas.xmlsoap.org/.../">
        <SOAP-ENV:Body>
          <SOAP-ENV:Fault xmlns:af="">www.aras.com/InnovatorFault">
            <faultcode>SOAP-ENV:Server.ItemAnalysisException</faultcode>
            <faultstring><![CDATA[Item Analysis Error. Some Items have incorrect attribute/property values syntax. See details for more information.
      Details:
      Incorrect value: "<config_id condition="in">select CONFIG_ID from innovator.DOCUMENT where STATE='Released' group by CONFIG_ID having COUNT(*)&gt;1</config_id>". Incorrect value explanation: "select" forbidden in property condition.
      ]]></faultstring>
            <detail>
              <af:legacy_detail><![CDATA[Item Analysis Error. Some Items have incorrect attribute/property values syntax. See details for more information.
      Details:
      Incorrect value: "<config_id condition="in">select CONFIG_ID from innovator.DOCUMENT where STATE='Released' group by CONFIG_ID having COUNT(*)&gt;1</config_id>". Incorrect value explanation: "select" forbidden in property condition.
      ]]></af:legacy_detail>
              <af:exception message="Item Analysis Error. Some Items have incorrect attribute/property values syntax. See details for more information.&#xD;&#xA;Details:&#xD;&#xA;Incorrect value: &quot;&lt;config_id condition=&quot;in&quot;&gt;select CONFIG_ID from innovator.DOCUMENT where STATE='Released' group by CONFIG_ID having COUNT(*)&amp;gt;1&lt;/config_id&gt;&quot;. Incorrect value explanation: &quot;select&quot; forbidden in property condition.&#xD;&#xA;" type="Aras.Server.Core.ItemAnalysisException" />
            </detail>
          </SOAP-ENV:Fault>
        </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      • alaxala's avatar
        alaxala
        Creator III
        [quote userid="4653" url="~/f/development/55312/aml-script-to-check-for-two-or-more-released-revisions-of-the-same-document-number/10526"]Incorrect value explanation: "select" forbidden in property condition.

        Add the 

        <operating_parameter key="parse_item" value="false"/>

        to InnovatorServerConfig.xml