In my BAQ i am collecting row in a sub query from the JobMtl table. This works ok for all rows-
sum((JobMtl.UnitLength * JobMtl.ItemQty) / 12)
but now i need to conditionally sum only on certain parts. We have 100’s of parts to exclude so it makes more send to use a common filter which is any part that starts with ‘PRT’, ‘SUB’ or ‘CPT’
I have tried various flavors from MATCH %PRT% to SubString(JobMtl.PartNum, 1, 3) = ‘PRT’
in a sub query, what do i need to filter the parts base on the first 3 letters so that they are excluded from the sum?
What this does is it first is an IF statement (using IIF… yes, that is EYE EYE EFF) which is treated like an excel if statement… then I have a string that has the three possible answers, and I look to see if that “list” contains the left three digits of the part number… if it DOES, then we add the value in your calculation, otherwise we add zero in the sum.