I'm working on a report through TCC that gives me a count of applicants by requisition with various filters applied using a complex projections. One of the complex projections counts a list of Applicants where a specific UDF on their candidate profile is Null. I'm using the Recruiting 17.4 Product, Entity: Requisition, and TCC version 17.4. Additionally, the alias for the main query is "mainQuery".
For some reason, this query produces a count of 0 for all requisitions:
<quer:projection alias="TotalWithoutSurveys" xmlns:quer="http://www.taleo.com/ws/integration/query">
<quer:query projectedClass="Application" alias="Q1">
<quer:projections>
<quer:projection>
<quer:count>
<quer:field path="Candidate,Number"/>
</quer:count>
</quer:projection>
</quer:projections>
<quer:filterings>
<quer:filtering>
<quer:equal>
<quer:field path="Requisition,ContestNumber"/>
<quer:field ownerQuery="mainQuery" path="ContestNumber"/>
</quer:equal>
</quer:filtering>
<quer:filtering>
<quer:isNull>
<quer:field path="Candidate,Gallup_5fTeacher_5fScore"/>
</quer:isNull>
</quer:filtering>
</quer:filterings>
</quer:query>
</quer:projection>
If I replace this chunk:
<quer:isNull>
<quer:field path="Candidate,Gallup_5fTeacher_5fScore"/>
</quer:isNull>
with this chunk:
<quer:isNotNull>
<quer:field path="Candidate,Gallup_5fTeacher_5fScore"/>
</quer:isNotNull>
It produces the correct values for this query (though incorrect for my purpose). Even stranger, if I replace it with this chunk:
<quer:equal>
<quer:replaceNull>
<quer:field path="Candidate,Gallup_5fTeacher_5fScore"/>
<quer:string>None</quer:string>
</quer:replaceNull>
<quer:string>None</quer:string>
</quer:equal>
it works correctly. Any idea of what I'm doing wrong?
Even I experienced this of 'IsNull' not being effective with the the UDF.
As an alternative you can do this by using 'isNotNull' and 'Not'
<quer:filtering xmlns:quer="http://www.taleo.com/ws/integration/query">
<quer:not>
<quer:isNotNull>
<quer:field path="Requisition,JobInformation,AD_5fdea_5fEmp"/>
</quer:isNotNull>
</quer:not>
</quer:filtering>