Kinetic BAQ widget in Application Studio

Good morning,

I am trying to send data to a BAQ with a subquery but I can’t seem to filter the BAQ at the top level by the values I have. I have done this successfully with a plain BAQ (no subqueries) by setting erp-baq > BAQ Execute Options > Where JobHead_JobNum = ‘{ReqDetail.JobNum}’


The BAQ this is referring to joins JobHead and Project so the JobHead_JobNum seems to correspond to the JobHead table and JobNum field.

My current BAQ I am trying to make work does the math in the subquery and at the top level, groups by the CustNum and finds the maximum value. I want that maximum value. I have a button used to test this BAQ query and displays the value in the dataview that is supposed to be populated but it always returns undefined.

Top Level BAQ

Top Level Display fields

Application Studio BAQ Widget


I have tried removing the quotes in the last screenshot but no change. I have also tried addind Calculate_ShipToInc.ShipTo_CustNum in the WHERE clause but I didn’t see any change.

Just tossing out examples of what I’ve used.

Have you tried adding the “??”

image

Here’s another example of one of mine, which works, just to give an example of a “AND” where clause:

Part_PartNum = '??{Part.PartNum}' AND PORel_OpenRelease = 'False'

I will test this. I was able to reduce this to a 1 level BAQ and it is working. I needed to get this working so I removed some complexities to get it to the form I am comfortable working with.

Thanks David

Do you know what the ?? does?

I could be wrong (often am)…

And actually, I think one (?) is probably more suitable.

One question mark (?) will return results to the grid when it matches that value. So, ShipTo_CustNum = your Customer.CustNum value.

Two question marks (??) will return results to the grid even if a value isn’t provided (null). So, in that use case, you would get results in your grid even if Customer.CustNum is null.

So, one ? is probably the preferred way.

The Where Clause is nice when you want to chain things together with AND / OR statements, but you can also use the Where List in the BAQ options if that is more straight forward.

The question mark notation actually (frustratingly) does not work with the BAQ widget’s Execute Options. RIP.

1 Like

That’s, indeed, how it should be.

ShipTo_CustNum = {Customer.CustNum}

I would hook your widget up to a button and monitor Dev Tools to see what it’s passing in the payload.

(Strings will be wrapped in single quotes)

Thank you, I also thought that and had went back and forth on trying with and without.