Blog

Drop Down Parameters for a BAQ

Creating Dropdown Parameters in a BAQ

In this example I will be telling you how to create a BAQ in Epicor version 10 that has a drop down parameter.

The first step is to create your main query BAQ, in this example I create a Part BAQ. I am saving this as a Shared BAQ so other users can access this BAQ and filling out the description field. Next I will add the Table(s) I want to see in my BAQ. This BAQ is a simple Part search, so I add the Part table in the Phrase Build tab. I add the company, part, description and class ID fields and test my BAQ. I see that many different Class ID values appear in my BAQ. However I want to filter the BAQ to only show one of these Class IDs at a time. At this point I save my Part BAQ. Navigate to the ‘Actions’ menu and select the Define Parameters options. You can now create a new parameter for you query. It is important that you select a data type that matches the field’s data type that you are filtering on. At this point we have created a new parameter, but it is just a blank text box with no values populating it. We can change this by selecting a different Editor Type. We could at this time make a static list of values for our drop down however it would need manual updating if new Class IDs were created. We do this using the Values Editor section at the bottom of the screen. We could also make this a drop down populated by a BAQ that would update in real time with the database, for those details contact PTS.

Now set the newly made parameter as a table criteria were the field you are filtering by equals your parameter. Clicking on the blue ‘specified’ key word brings up the ‘Select Parameter’ dialog box. Here we can select the parameter we created in the earlier step. Now the criteria we’ve created says the ClassID equals the parameter we’ve created. Now the criteria have the name of the parameter showing in the filter value column. To test our new parameter I navigate to the ‘Analyze’ tab and click the ‘Test…’ button. When I do this my Parameter pops up, when I click the drop down I see the descriptions in the drop down from my other PartClass BAQ. I select Aluminum and click ‘OK’ as a test.

Now all the parts that appear in our search have a ClassID of ALUM which is the code associated with the description of Aluminum.