I am trying to write a BAQ that filters on a Null and I cant seem to figure out how to do this.
I would like to show only the JobOper records where my open jobs do NOT have any JobOpers.
I have a main BAQ that lists all of my Open Jobs. I then added the JobOper table and did a left join.
I see the blank fields from JobOper where there are no operations - However I would like to filter my main BAQ so the only thing showing is the Jobs that have NO JobOper Records.
Am I over thinking this? Any Help greatly appreciated.
In Table Criteria, under the operation where it defaults to â=â there is an option for âISNULLâ that you can then apply to your field, whether it be the Operation or the Opr column.
Mr. Brian: I see the ISNULL however - when I add that as a table criteria - It does not work correctly.
I should see just 11 records and when I add the ISNULL condition to the JobSeq field on the JobOper Table, I get 559 records. I must be doing this wrong.
Mr. Tanner: Thank you for the suggestion.
I was able to create a calculated field that shows the right answer - however I donât see my calculated field in the list of fields available for table criteria.
I suppose if I was going to use this BAQ in a dashboard I could apply a filter on my calculated field - however I donât plan on using this BAQ in a dashboard.
Any other suggestions appreciated - maybe use a subreport somehow?
DaveO
It appears you would need to use a subquery and filter the criteria on the subquery. There is a feature request on the EUG board to add the ability to use SQL in BAQ designer which would make this much simpler.
Thank you Mr. Nash: That did the trick.
Use SubQuery condition (even though i technically do NOT have a subquery) and it works perfectly. No Calculated field needed.
Just added to this thread as the solution from Ken didnât work for me. I had to a criteria, and not a sub one (although Iâm taking note of that solution for future use), to say FIELD <> constant and then when the pop up box came up saying whatâs the constant I didnât type anything and just pressed ok. The BAQ screen then had âEmpty stringâ as the constant. Then the only result I got back where when we had typed something into that field:
I think I remember conversations with DBAs and what really is NULL. I suppose it depends on what solution will work depending on what Epicor state the DB table structure to be.