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
  • Hello Leo, If your relationship is related (related_id != null): To get items without relationships:
     <AML>
       <Item type='Part' action='get'>
         <Relationships>
         <Item type='Part BOM'>
           <related_id condition='is null' />
         </Item>  
         </Relationships>
       </Item>
     </AML>
    To get items with relationships:
     <AML>
       <Item type='Part' action='get'>
         <Relationships>
         <Item type='Part BOM'>
           <related_id condition='is not null' />
         </Item>  
         </Relationships>
       </Item>
     </AML>
Reply
  • Hello Leo, If your relationship is related (related_id != null): To get items without relationships:
     <AML>
       <Item type='Part' action='get'>
         <Relationships>
         <Item type='Part BOM'>
           <related_id condition='is null' />
         </Item>  
         </Relationships>
       </Item>
     </AML>
    To get items with relationships:
     <AML>
       <Item type='Part' action='get'>
         <Relationships>
         <Item type='Part BOM'>
           <related_id condition='is not null' />
         </Item>  
         </Relationships>
       </Item>
     </AML>
Children
No Data