I want to create an Export in Taleo Connect Client to find candidates that are missing either an Address, City, or ZipCode. However, I don't know how to create a filter with multiple conditions.
For example: The filters below will find candidates where Address
, City
, and ZipCode
are empty.
<quer:filtering>
<quer:isNull>
<quer:field path="Address"/>
</quer:isNull>
</quer:filtering>
<quer:filtering>
<quer:isNull>
<quer:field path="City"/>
</quer:isNull>
</quer:filtering>
<quer:filtering>
<quer:isNull>
<quer:field path="ZipCode"/>
</quer:isNull>
</quer:filtering>
How would I filter candidates where Address
, City
, OR ZipCode
are empty?
You can nest multiple <quer:or>
statements to combine pairs of two conditions.
<quer:filtering xmlns:quer="http://www.taleo.com/ws/integration/query">
<quer:or>
<!--Condition 1-->
<quer:or>
<!--Condition 2-->
<quer:or>
<!--Condition 3-->
<!--Condition 4-->
</quer:or>
</quer:or>
</quer:or>
</quer:filtering>
Complex filter if Address, City, or ZipCode are null:
<quer:filtering xmlns:quer="http://www.taleo.com/ws/integration/query">
<quer:or>
<quer:isNull>
<quer:field path="Address"/>
</quer:isNull>
<quer:or>
<quer:isNull>
<quer:field path="City"/>
</quer:isNull>
<quer:isNull>
<quer:field path="ZipCode"/>
</quer:isNull>
</quer:or>
</quer:or>
</quer:filtering>
Full Export:
<quer:query productCode="RC1704" model="http://www.taleo.com/ws/tee800/2009/01" projectedClass="Candidate" locale="en" mode="CSV" largegraph="true" preventDuplicates="false" xmlns:quer="http://www.taleo.com/ws/integration/query">
<quer:subQueries/>
<quer:projections>
<quer:projection alias="CandidateNumber">
<quer:field path="Number"/>
</quer:projection>
</quer:projections>
<quer:projectionFilterings/>
<quer:filterings>
<quer:filtering xmlns:quer="http://www.taleo.com/ws/integration/query">
<!--If Address, City, or ZipCode are null-->
<quer:or>
<quer:isNull>
<quer:field path="Address"/>
</quer:isNull>
<quer:or>
<quer:isNull>
<quer:field path="City"/>
</quer:isNull>
<quer:isNull>
<quer:field path="ZipCode"/>
</quer:isNull>
</quer:or>
</quer:or>
</quer:filtering>
</quer:filterings>
<quer:sortings/>
<quer:sortingFilterings/>
<quer:groupings/>
<quer:joinings/>
</quer:query>
Thanks to ThinkTalent Tech Blog for demonstrating how to use <quer:or>
.