How to filter a erp-combo-box based on another field

Hi everyone, I’m new to Application Studio and is wondering how can i filter a combo-box which is a dropdown list and populated by a BAQ? I want it to only show a certain rows based on another field’s value.
image
The purpose code field will only show certain codes based on the payment total value which is a field in the AP Payment Entry CheckHed.PaymentTotal.

  • If CheckHed.PaymentTotal <= 10,000, required drop-down list to show 71100
  • If MYR 10,001<= CheckHed.PaymentTotal < 200,001, required drop-down list to
    show 09001, 11110, 11120, 11130
  • If CheckHed.PaymentTotal > 200,001, required drop-down list to show 00000

I have a parameter in the BAQ for the Payment Total but cant figure out how to pass the value from this AP Payment screen to the BAQ.

Alternatively, I can also populate the combo box with User Codes but have tried to use the filter fields in properties of the combo box but I’m not sure if the syntax is correct or it doesn’t work.

Any help would be appreciated!

Here’s an example:

First, let’s say I want my combo to be filtered from the “ResGrpID” field of the “UD_SearchFilters” dataview.

  1. Setup the BAQ DataView of your combo. I do not use the parent dataview feature

  2. Configure your BAQ Combo


  3. Create an event to execute the BAQ and store the result in your dataView. You can configure the BAQ widget to pass parameters in your case


  4. Create an event that triggers on your “parent field” change, so that the refresh BAQ is called

  5. You should also call the refresh of the BAQ on load or something like that, for initialisation. I like to use after “WindowOnLoad” in my custom dashboards

In my case, I’ve got a combo filtered by another combo, which works fine :

4 Likes

Hi Mathieu, I’ve followed your steps and managed to get it to work but i have a question which is, is it possible for the combobox to auto load the saved data? Currently when the form loads or refresh its blank
image

but after clicking on the box, it would load
image

I tested on my end and it seems to work. Can you post screenshot of your combo properties ? EpiBinding, etc ?

1 Like