The textbox id is mySearch. I’m trying to grab it’s value to filter the BAQ by putting it in the Where List (using this syntax '${mySearch}'). I know I can filter the BAQ if I hardcode a value, but I can’t seem to grab a dynamic value from my textbox.
Any idea what I’m doing wrong? Could anybody point me in the right direction?
You’ll have to bind your text box to a data view and column (like TransView.mySearch) in the EpBinding field, then use that full name in your Where List: '?{TransView.mySearch}'
(You might have to initialize TransView, if that hasn’t already been done)
Agree with @jwphillips, you need a full binding for your field. You can’t just call out a control ID. You need to call out where the “value” that is being displayed in that control (textbox) is being stored in a DataView. Then you reference that full binding in your “Where”.
If you can’t get it to work, you can also try backing up one screen in your Grid Settings… instead of using a “Where List”, you can just set a Where Clause in the BAQ Options.
Below is an example. Here, UD02_Key1 is the column in my BAQ and I’m setting that equal to ‘??{KeyFields.PartNum}’
And I’m trying to initialize it with On Create, run an event.
Is this how I initialize the TransView dataview??? Saw something similar here.
But its still not applying the filter. I guess I’m expecting it to filter upon typing or hitting the enter key.
What am I missing? Do I need another event? What else can I try?
When you debug in the browser (Ctrl + Alt + 8), you can hit Ctrl + Alt + V to dump the data in all the data views - then you can see what the value of your TransView.Search value is - and confirm that it’s getting set and not getting cleared, etc
It also helps to look at the Network tab and see what your ExecuteBAQ calls look like - to confirm that your where clause is getting set (or not)
Created two dataviews. One for the BAQ, which I used the wizard to create. And a manually created one which I named TransView. TransView holds the value of the textbox.
Now that the textbox is bound to the dataview, I added an On Create behavior to the textbox. (I think this is the initialization?) This should be… Type: Ep Binding Hook: onInit Target: TransView.Search
Go back to your grid > Grid Model > Provider Model, and add these… Ep Binding: dvMenuTracker (your BAQ dataview) Baq ID: MenuTracker (your BAQs actual name)
Then go to your grid > Grid Model > Provider Model > Baq Options > Where List, add a new where list item. The column will be the column you want to filter by, condition and Value. The value will be something like '??{TransView.Search}'