I was given a request to create a BAQ that outlines missed operations on a job. i.e. the person will scan int operations 10,20, then skip 30, then scan into the remaining steps.
This can happen on just one operation or multiple operations where the operator just skips or forgets to scan into an operation.
Ive already created a BAQ that shows ANY missed/not scanned operations, but this shows jobs with operations pending to be started as well.
I’m not sure how to go about the logic of just showing operations that are missed in between.
I think I get what you’re after: Find operations that were never scanned/clocked into (skipped), excluding operations that the job hasn’t made it to. I’ve done something similar, can you post your BAQ so far?
Lines 1-3 are correct and what I would expect from this report, but line 4 is something I’m trying to avoid (operations 100 and 110 are yet to be done and are not missed)
Gotcha. You could make a subquery to find the highest opr seq clocked into for each job, then use that to filter the ops not started (skipped opr seqences must be < highest opr sequence clocked into).
This isn’t a BAQ, it’s SQL, but it’s what I use to find missed ops. Could probably turn it into a BAQ easy enough.
select *, ROW_NUMBER() OVER (ORDER BY JobNum) AS RowNum
FROM
(SELECT DISTINCT JobHead.JobNum, JobHead.PartNum, PrevJobOp.OprSeq FROM Erp.JobHead
INNER JOIN Erp.JobOper ON
JobHead.Company = JobOper.Company AND
JobHead.JobNum = JobOper.JobNum AND
JobOper.OpComplete = 1
INNER JOIN Erp.JobOper PrevJobOp ON
JobHead.Company = PrevJobOp.Company AND
JobHead.JobNum = PrevJobOp.JobNum AND
PrevJobOp.OprSeq < JobOper.OprSeq AND
PrevJobOp.OpComplete = 0
WHERE
JobClosed = 0) Base