Filters Used with Fetch and Delete
Filters are used for operations like fetch and delete. Both simple and Groovy expressions are supported in the value element.
For example, this filter specifies an AND condition where we want to get all data with the fieldName "company" equalling to "OPEL":
<filter id="opelProductsFilter">
<and>
<criterion fieldName="company" operator="equals" value="OPEL"/>
</and>
</filter>
Available Filter Operators
equals | contains | notInSet | iNotEndsWith |
notEqual | startsWith | iContains | notContains |
greaterThan | endsWith | iStartsWith | notStartsWith |
lessThan | isNull | iEndsWith | notEndsWith |
greaterOrEqual | notNull | iNotContains | |
lessOrEqual | inSet | iNotStartsWith |
Examples
In this example we want to get all data for "OPEL" or "BMW".
<filter id="opelProductsFilter">
<or>
<criterion fieldName="company" operator="equals" value="OPEL"/>
<criterion fieldName="company" operator="equals" value="BMW"/>
</or>
</filter>
Â
In this example we want to filter all products which are "OPEL" with a price less or equal to "10000" or "BMW" with a price less or equal to "20000".
<filter id="opelProductsFilter">
<or>
<and>
<criterion fieldName="company" operator="equals" value="OPEL"/>
<criterion fieldName="price" operator="lessOrEqual" value="10000"/>
</and>
<and>
<criterion fieldName="company" operator="equals" value="BMW"/>
<criterion fieldName="price" operator="lessOrEqual" value="20000"/>
</and>
</or>
</filter>
Â
In this example we want to filter all products which are "OPEL" with a price less or equal to the value in header.price.
IntegrationManager version 5.8.0