Help with BAQ Query

Hello Everyone,

I need assistance in creating a BAQ that will pull the job information shown on the purchase order screen. I see the job and the table used when I select the Purchase Header and Job Header there doesn’t seem to have any relation so the query just bombs. (See below) information trying to capture with Purchase order information.

If someone can explain or show me how to make the relationship. I would greatly appreciate it.

Thanks in Advance

Miguel

There won;t be any Job info in the PO Header. It will be in the PODtl or PORel.

PODtl is linked to SORel

Vinay Kamboj

The links your are looking for are POHeader -> PORel -> JobMtl or JobOper -> Job Head.
Subcontract operation POs link to a JobOper OprSeq and Job Material POs link to JobMtl AssemblySeq and MtlSeq.

Thanks I got it working now. How do I remove repeating information? I am getting duplicate entries for every line.

Thanks In Advance.

Miguel

Can you post the BAQ as you currently have it? Show the designer sheet that shows the tables graphically linked. And then click the links to show the relationships.

Hello Calvin,

Below is my designer sheet

Thank you.

Miguel

Hello Calvin,

You can see my BAQ (shown below) is duplicating every field except the OpDesc which is weird since the operation and OpDesc are pulling from the same table. In addition, I would expect the description would be the same.

I would appreciate any assistance you can provide to stop the duplication.

Thank you.

Miguel

My guess is your duplication is probably due to the JobOpDtl join. If you do not need that table then join PORel.JobNum, AssemblySeq, JobSeq to JobOper.JobNum, AssemblySeq, OprSeq

1 Like

I’d make sure AssySeq is included in the joins

Hello Calvan,

I have the information and I added the AssemblySeq, but still getting the duplicates of 4 each.
See below.

My selection criteria is for 1 purchase order with 2 lines on the PO for operations 100 and 130.

I would appreciate any assistance.

Thank you.

Miguel

@RC2020 I think in 9 picking first from the which item drop down would fix this.

Hello Greg,

I made the change shown below.

Below is my output, it is still replicating the same entry 3 more times and the second line is now not appearing since I say only show the first record.
.

Thank you for your assistance.

Regards,

Miguel

@RC2020 Try first on JobOpDtl

Hello Greg,

Now the BAQ displays nothing. (See below)

Thanks for your assistance.

Miguel

@RC2020 Make sure each is on PODetail. Join PORel to JobOper. Join JobOper to JobHead and do First on JobOprDtl.

@RC2020 - back when just had two rows when you expected one, the last field was showing up different

You need to figure what table relationship you’re missing that is pulling records from two different operations