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?
question from:
https://stackoverflow.com/questions/66051396/tcc-isnull-producing-inconsistent-results 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…