BPM for material and labor completion

Hello,

I am not familiar with coding and have only done the most basic of BAQ’s, but I have been tasked with developing hard stops for Epicor. One to prevent labor entry on an assembly if the material is not issued for that assembly, and one to prevent labor entry if the previous operation is not done. I have found some things in forums where people reference a BPM like that, but they are more advanced than I, so their explanation is a little too technical for me. One user said they have a pre-processing method directive on the labor.update.

Preprocess Labor.Update

I understand that, but then they say:

Conditions are two queries (number of rows in the ‘abc’ query is not less than 1) joined by an ‘OR’ operator.

First query (covers operations at current assembly level):

For each ttLaborDtl where ttLaborDtl.RowMod = “A” no-lock,
Each JobOper where JobOper.Company = Cur-Comp and JobOper.JobNum = ttLaborDtl.JobNum and JobOper.AssemblySeq = ttLaborDtl.AssemblySeq and JobOper.OprSeq < ttLaborDtl.OprSeq.

I understand adding the Condition, and choosing the “Number of rows in designed query is not less than 1”, but when I go to design the query, I can choose tables and have criteria, but I am not understanding where they are adding the For each and ttLaborDtl.RowMod.
I know that when I design a BAQ, that is what the code might look like on the first screen, but I don’t even see anywhere where I can tell this to go to a BAQ that I have already created. I have looked through the BPM PDF’s I have from Epicor, and maybe I am just missing it, but can someone give me a clue?
Any help is greatly appreciated.

Thinking you might be able to get there by opening up join on your tables a little bit?
e.g. join the tables on Company/Partnum
then add criteria to the Job table - limit Asm/OpSeq(…RelOp)
where you check Issued Complete?
image

I have tried this, and it comes up with a compilation error whether I use true or yes. It says these terms don’t exist in this context.