Monthly Archives: December 2017


TCC – Subquery against another entity

So I was having to write an export that would mimic the results of and OBI report so that it could be automated. The logical entity to pull this information in was the application as it had candidate and requisition data that was needed for the report. Unfortunately, there was a filter in the OBI report saying that the requisition had to be posted. Now the problem here lies in the fact that you cannot access the SourcingRequest table from the application entity. So I’m like well, if I were writing this out, I would just make sure that:

ContestNumber in (select ContestNumber from SourcingRequest where PostingStatus = ‘posted’)

After monkeying around with it I finally got it to work and it’s done by putting in a subquery in the general filters:

<quer:filtering xmlns:quer="">
		<quer:field path="Requisition,ContestNumber"/>
		<quer:query projectedClass="SourcingRequest" alias="sqMotives" preventDuplicates="true" pagingsize="1">
					<quer:field path="Requisition,ContestNumber"/>
						<quer:field path="SourcingRequestStatus,Number"/>