BAQ labor logged on operation marked complete

I am trying to create what I thought was a “simple” BAQ query.
I am wanting to see any job that has/had labor activity logged to an operation AFTER that operations was logged as complete.
Any help would be greatly appreciated.

Hi Vicki,

One thing that can help (if you have it in 10.1.400 :thinking:) is the SubQuery Criteria:

image

If you link your JobOper with your Labor Details, you can then compare values from two different tables like Operation Complete Date and the Labor Detail record.

Mark,
I am not sure what the details i wold want to display on each table, I understand how to link them.
relatively new to sub queries.

Hey Vicki,

I went to work up an example and found that the completion date for the operation is not a field in JobOper. (I was probably thinking of JobHead).

SO…that is a problem for us, because the only way to back into that date is to look at the last labor transaction. :thinking: Yeah, that defeats the whole reason for your report!

If it were me, I would add a UD field to JobOper that gets populated by a Data Directive with the current date when JobOper.OpComplete goes from False to True.

Then you can compare JobOper.LastLaborDate to your UD field to get the answer you want.

If your jobs are quick (within a day), then you might be able to use the JobHead.JobCompleteDate to get something in the meantime.

@VTEngineering @Mark_Wonsil I think you can do this from just LaborDtl. Complete is a field there and that is what is shown in job tracker.

Join LaborDtl of completed records to LaborDtl of the same job, asmseq, oprseq that has a LaborDtlSeq > LaborDtlSeq of the completed record.

Ah, there it is! Thanks @gpayne!

Would one have to watch out for an operation completed, uncompleted, and then completed again? :thinking:

1 Like

Each complete would qualify to be checked for additional labor detail records, unless you did a group by and took the max completed record for each operation, but that would likely hide the very activity you are wanting to find.

1 Like