How to set up drop down BAQ Parameters
Creating Drop-Down Parameters in an Epicor® BAQ
- The first step is to create your main query BAQ. In this example, we will create a Part BAQ. We will save this as a Shared BAQ so other users can access this it and fill out the description field.
- Next, add the Table(s) you want to see in. This BAQ is a simple Part search, so add the Part table in the Phrase Build tab. Additionally, add the company, part, description and class ID fields and test the BAQ. After running the BAQ, we see many different Class ID values appear. However, we want to filter the BAQ to only show one of these Class IDs at a time.
- At this point save the Part BAQ.
- Then, 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 more details on how to complete this step, please contact PracticalTek.
- Next, 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. The criteria have the name of the parameter showing in the filter value column.
- To test our new parameter, navigate to the ‘Analyze’ tab and click the ‘Test…’ button. When we do this, the Parameter pops up. Then, when we click the drop-down, we see the descriptions in the drop-down from our other PartClass BAQ. 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.