AML search to return only the count of object corresponding

Hi community,

I have a request to get from an AML request only the number of item corresponding to the AML request.

In Odata and SQL it is ok but I cannot find the equiavlent.

I precise that I do not want to create a method to count the items from a tab.

For example I want to get the number of the Parts with status = Draft

Best regards,

Hadrien

Parents
  • New way to answer to this

    Here an example with Apply Item + countOnly

    <AML>
      <Item type="Part" action="get" select="id,_status,_authoring_tool" returnMode="countOnly">
        <generation condition="ge">1</generation>    
          <_status>
            <Item type="_status" select="id" action="get">
              <_name>Opened</_name>
            </Item>
          </_status>
       </Item>
    </AML>

    Aras répond

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="">schemas.xmlsoap.org/.../">
      <SOAP-ENV:Body>
        <Result />
        <Message>
          <event name="pagemax" value="1" />
          <event name="itemmax" value="48" />
          <event name="items_with_no_access_count" value="0" />
        </Message>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    It works better in particular if it returns 0 => 30% faster

    Best regards,

    Hadrien

Reply
  • New way to answer to this

    Here an example with Apply Item + countOnly

    <AML>
      <Item type="Part" action="get" select="id,_status,_authoring_tool" returnMode="countOnly">
        <generation condition="ge">1</generation>    
          <_status>
            <Item type="_status" select="id" action="get">
              <_name>Opened</_name>
            </Item>
          </_status>
       </Item>
    </AML>

    Aras répond

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="">schemas.xmlsoap.org/.../">
      <SOAP-ENV:Body>
        <Result />
        <Message>
          <event name="pagemax" value="1" />
          <event name="itemmax" value="48" />
          <event name="items_with_no_access_count" value="0" />
        </Message>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    It works better in particular if it returns 0 => 30% faster

    Best regards,

    Hadrien

Children