Example of Getting Objects That Do Not Have a Specified Association

The NOT function is intended to be used primarily with the GetMetadataObjects method. The NOT function can be specified in the <XMLSELECT search="criteria"/> element to find all objects of a specified metadata type that do NOT have an association through the specified AssociationPath.
To be useful, a Property object must be associated with an object, or belong to a PropertySet or a PropertyGroup. The following request specifies to concatenate three association paths with the NOT function to return Property objects that do not have any of these associations:
<GetMetadataObjects>
  <Reposid>A0000000.A5TJRDIT</Reposid> 
  <Type>Property</Type> 
  <Objects/> 
  <Ns>SAS</Ns> 
  <Flags>404</Flags> 
  <Options>
  <XMLSELECT search="Property[not(AssociatedObject/*)]
[not(AssociatedPropertySet/*)][not(AssociatedPropertyGroup/*)]"/> 
  <Templates>
  <Property Id=" Name="" Desc="" PropertyName="" PropertyRole=""/>
  </Templates>
  </Options>
  </GetMetadataObjects>
When there are no orphaned Property objects, the request returns no objects.