CodeCharge Studio

Setup Search Parameters

  1. Switch to page Design mode.
  2. Select the Grid form by either selecting it in the Project Explorer or by positioning the cursor anywhere within the Grid's caption on the page.
  3. Click on [...] button in the Data Source property of the Grid.

    Once the Data Source window opens up you will see several parameters created by the Query Builder in the Where section. The two parameters there indicate that the Grid should be filtered by two keywords: s_emp_name and s_department_name. Both of those keywords come from the Search form and will be matched against the emp_name and department_name fields from the database respectively. However, we would also like to search by employees' titles, and since the department_name was changed to a ListBox it will need adjustment as well.

  4. Click the '+' sign to add a new Where parameter that will be used in the Grid.
  5. Select the field title.
  6. Specify that it should be matched against the search parameter s_emp_name, the same as used to search emp_name.
  7. For the Condition specify contains (like ';%...%') so that all employee titles that contain the keyword s_emp_name will be retrieved.
  8. Modify the search parameter associated with the department_name.
    1. Double click on it.
    2. In the parameter setup window select departments.department_id as the field that will be searched with the s_department_name parameter.
    3. Select equals (=) as the Condition since users will select the exact department using the ListBox and set the Type to Integer.
  9. Finally, we need to specify that we want to see the results if either the Employee Name or Title matches the specified Keyword.

    Click on the title parameter and move it upwards (^)

  10. Select both the emp_name and title parameters by
  11. Click the parentheses button [( )] to make the search of these two parameters independent from searching the department.
  12. Double-click on the emp_name parameter and set the And/Or field to Or.

    Your final Where/Search parameters screen should look like the one shown here.

Next: Publish the Page


On-line, printable versions and updates