Using @defined_as to Filter xProperties
Copy
The following conditions enable you to filer items according to their defined status:
- “is defined”
- “is not defined”
Use the @defined_as attribute to filter items according to how they are defined. You can use the following values with the attribute:
- “class” indicates that the xProperty is defined using classification. It does not matter whether or not the xProperty is defined explicitly.
- “explicit” indicates that the xProperty is defined explicitly. It does not matter if the xProperty is defined/not defined explicitly).
- “class|explicit” indicates that the xProperty is defined both by classification and explicitly.
The following example gets all the Parts with a defined xProperty from the database. It does not matter how the xProperty is defined:
<AML>
<Item type="Part" action="get">
<xp-cost condition="is defined"/>
</Item>
</AML>
The following example gets all Parts from the database that have an explicitly-defined xProperty:
<AML>
<Item type="Part" action="get">
<xp-cost condition="is defined" defined_as="explicit"/>
</Item>
</AML>
The following example gets all Parts from the database, which have an xProperty that is NOT defined using classification:
<AML>
<Item type="Part" action="get">
<xp-cost condition="is not defined" defined_as="class"/>
</Item>
</AML>