I have a Classic BAQ Combo customization on our MES Start Rework Activity menu and I am trying to convert this to Kinetic using Application Studio. The BAQ combo displays available DMR #'s based on the Job Num, Assembly, Operation entered/selected on the MES Rework Activity.
I can get the DMR # field to display on the kinetic menu but it is grayed out and I cannot figure out which setups in Application Studio to populate to trigger the BAQ which in classic returned the list to be displayed in the drop down.
I have tried adding EpBinding & EpBinind Text Column in the Data section
The BAQ used for this is as follows:
select
[DMRHead].[DMRNum] as [DMRHead_DMRNum]
from Erp.DMRHead as DMRHead
where (DMRHead.OpenDMR = 1 and DMRHead.JobNum = ‘[Like:JobHead.JobNum]’ and DMRHead.AssemblySeq = [Like:JobAsmbl.AssemblySeq] and DMRHead.OprSeq = [Like:JobOper.OprSeq])
group by [DMRHead].[DMRNum]
order by DMRHead.DMRNum
Other fields are bound to KeyFields and LaborDtl. I tried both and get a little farther in that the DMR # is no longer grayed out but when I select it I get “No Data Found” . Wondering if now something needs to change in the BAQ?
Try this in the browser:
Preview your layer.
Press F12 to open Dev Tools.
Drop down your BAQ combo box.
Go to the network tab of the Dev Tools and look for an Execute By ID (or something similar).
Click on that event–does it give you any clues?
Additionally, when you run the BAQ in the BAQ editor, it pulls back data, yeah?
Looking at your query, it looks like you’re filtering on Job/Asm/Op–are you doing that in the BAQ? Via parameters? In App Studio?
It’s the BAQ as for the Classic customization I use the where (DMRHead.OpenDMR = 1 and DMRHead.JobNum = ‘[Like:JobHead.JobNum]’ and DMRHead.AssemblySeq = [Like:JobAsmbl.AssemblySeq] and DMRHead.OprSeq = [Like:JobOper.OprSeq] and the drop down list only returns the open DMR #'s for the Job/Asm/Op I entered/selected on the Start Rework Activity screen
So, what I would do is remove this stuff from the BAQ:
‘[Like:JobHead.JobNum]’ and DMRHead.AssemblySeq = [Like:JobAsmbl.AssemblySeq] and DMRHead.OprSeq = [Like:JobOper.OprSeq]
Then add those to the where clause in App Studio to filter the results based on the fields KeyFields.JobNum, LaborDtl.AssemblySeq, and LaborDtl.OperSeq.
So, looking back at my notes, it turns out the where clause is bugged.
There are a couple methods you can go from here.
You can set up the filters/filtersParams.
One thing to note about the bold items in this line: QuoteNumCol=?[QuoteNum],QuoteLineCol=?[QuoteLine] is that the combo only knows about the fields within the dataview its bound to. In my example, the combo is bound to QuoteDtl.Character01, so it will only know about fields within the QuoteDtl table. This is why you only need to write it as [QuoteNum] vs [QuoteDtl.QuoteNum]. That being said, it’s also a limitation if you need filters from multiple views. If you do, then I suggest following the below method and bind them to a BAQ View.
OR
You can create a BAQ View to load your data, then hook into an action (like AfterGetByID) to create an event to filter your view based on the loaded Job/Asm/Op, which is a bit more complex.
Another edit–you could also probably use the REST widget to call your BAQ and populate the filters or parameters that way and then plop that into a view and bind that view to your combo.
I finally have victory using the Reusable Combo Section Filter and Filter Params fields. THANK YOU for the help!!! It was not the easiest to figure out the syntax that I required as I had 3 fields from my BAQ that I needed to filter based on the Job/Assembly/Operation selected on the MES Start Rework Activity screen.
Here are the filters I ended up getting to work…
Filters: DMRHead_JobNum = ‘?{JobNumColumn,’’}’,DMRHead_AssemblySeq = ‘?{AsmSeqColumn}’,DMRHead_OprSeq = ‘?{OprSeqColumn}’
I also discovered I had the EpBinding in the Erp-Comb-Box wrong (was using Keyfields.JobNum and changed to LaborDtl.JobNum). I am now able to filter and return open DMR #'s for only the Job/Assembly/Operation selected - like I was doing in Classic.
I am back…while this solution returns the expected DMR #'s once I click OK to continue working the Rework I get errors - Asm reference invalid value & Opr reference invalid Value.
Any thoughts?