Basic Issue: BAQ with Single Parameter. (returns single Part record given Part Number)
Application Panel with Single Text Box (For Part Number) for entry and display Fields linked to View
Currently “On-Blur” event causing popup asking for BAQ parameter. want to use Textbox value as BAQ parameter to return Part record.
Need correct syntax and how to wire it all up…should be simple…
Some Additional Context:
BAQ has @PartSearch as parameter (Tested returns single row )
On-Blur Event triggers BAQ
BAQ Pops up Parameters entry;
Create the onBlur event from your textbox and load up the BAQ in GET mode.
Assign it to a dataview as well, so the data has somewhere to go. I suppose, technically, you could probably use ActionResult, but setting it to a defined dataview makes it easier to follow along and understand.
Not sure what you’re doing after the BAQ runs, but in this instance, I’m setting the result of the BAQ to the field TransView.PartDesc which is bound to the textarea below the textbox.
It looks like you’re trying to create a search by part number. Is there something special about the data being returned in the BAQ?
If not, every textbox widget has a property called “Enable Search” that will add a magnifying glass to the textbox that a user can click on to initiate a standard search. I have a post out there somewhere on how to wire it up if you need or want.
It is Basically a Search, however user already knows the Part Number, Just needs the record.
So currently the issue is just getting the value from the Text Box, into the BAQ parameter.
Right now when running I can enter Part:
BAQ Parameter Window pops up:
Enter Part Again: (Press OK)
BAQ Runs and Items Display:
You are correct in that the ItemView is uninitialized until BAQ runs.
I end up with the same basic issue, where is the Textbox value stored and how to pass (reference) that in the BAQ parameter field and run without the popup…
The fact that the erp-baq has a BAQ Parameter section suggests that, I just do not know the syntax to reference the initial textbox value.
Why not bind the search field to TransView.PartNum? Does it ever need to be saved to the database? If not, TransView will serve for your needs.
how to pass (reference) that in the BAQ parameter field and run without the popup…
To this point, you wired it correctly, but I would change the binding to something else. If that field has a value, it will pass silently, otherwise it should still slide out.
The parameter value should have curly braces: {TransView.PartNum}.
What screen is this in? Is this native (I assumed it was)? If not, you will need to create the initialize event.
Create an event that fires after Form_onLoad and use a row-update to set TransView.PartNum to "".
Hannah, Thanks so much for your support, I did try with and without {} , still no luck.
I will clear the current App and start Fresh as it’s getting a little messy.
Will advise if I get it working.
I can’t see BAQ Parametrs in erp-baq widget.
Is it because of version 2022.2.14? If this is a case - is it possible to pass parameter somehow to avoid slider?