AML request get where relationship is empty

Hi all, I'm struggling with an AML request, i would like to get items from an Item Type where a certain Relationship is Empty, and an other request  where this Relationship is not empty. Thank you ! Léo
Parents
  • Leo, Sorry I have one error in AML (for "To get items with relationships"), you need to add action='get' to the Part BOM item tag:
     <AML>
       <Item type='Part' action='get'>
         <Relationships>
         <Item type='Part BOM' action='get'>
           <related_id condition='is not null' />
         </Item>  
         </Relationships>
       </Item>
     </AML>
    For the second case you can do it using following AML:
      <AML>
        <Item type='Part' action='get' where="[Part].id not in (select source_id from Part_BOM)" />
      </AML>
    
    Keep in mind that starting Aras 11SP9 where attribute of this type is not secured and in the future version will be obsoleted. Till then if you are using Aras 11SP9 you need to add following XML tag to your InnovatorServerConfig.xml
    <operating_parameter key="parse_item" value="false"/>
    
Reply
  • Leo, Sorry I have one error in AML (for "To get items with relationships"), you need to add action='get' to the Part BOM item tag:
     <AML>
       <Item type='Part' action='get'>
         <Relationships>
         <Item type='Part BOM' action='get'>
           <related_id condition='is not null' />
         </Item>  
         </Relationships>
       </Item>
     </AML>
    For the second case you can do it using following AML:
      <AML>
        <Item type='Part' action='get' where="[Part].id not in (select source_id from Part_BOM)" />
      </AML>
    
    Keep in mind that starting Aras 11SP9 where attribute of this type is not secured and in the future version will be obsoleted. Till then if you are using Aras 11SP9 you need to add following XML tag to your InnovatorServerConfig.xml
    <operating_parameter key="parse_item" value="false"/>
    
Children
No Data