Maybe I’m over thinking this one or just brain dead right now. So I have many jobs that have one or many operations. I am trying to single out jobs which only have a single JobOper.OpCode of “ASSEM”. I am just trying to get assembly only jobs but I’m struggling… Oh Epicor 9.05, so this would be in ABL.
For me to do this, the JobOper table must be a summary table which I cannot have. This BAQ/Dashboard is to display all Jobs and their operations. I am trying to set a calculated field to true if there is only one operation where the OpCode equals ASSEM.
Didn’t realize it was part of a dashboard you are kind of out of luck you’ll have to either customize the dashboard to fill in that caculated fied… or use a BPM to flag the records ahead of time. (in 9)
In my BPM, I should be able to iterate through each operation (for each) within a job with a counter. If it only counts 1 AND that counted operation’s OpCode is “ASSEM” then set my calculated field to true…Just how?
My brain just unlocked… This was a big duh so sorry for wasting all of your time.
DEF VAR COUNTER AS INTEGER no-undo.
For EACH ttResults no-lock.
COUNTER = 0.
Find FIRST JobHead where JobHead.JobNum = ttResults.JobHead_JobNum no-lock no-error.
If AVAIL JobHead then DO:
For EACH JobOper where JobOper.JobNum = JobHead.JobNum no-lock.
COUNTER = COUNTER + 1.
End.
If COUNTER = 1 and JobOper.OpCode = "ASSEM" then ttResults.Calculated_AssemblyOnly = TRUE.
End.