Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

If your options will have spaces, append the URL with !encode=true to accurately list options. An example of the the syntax is {sc.value!encode=falsetrue}.

When you test the form, the Customer dropdown is successfully populated but when a customer is selected, the Select Order Dropdown does not populate.

...

  1. You will need a query to run against the database. This query, which is included in the BIRT queryset in the configuration.xml file, uses the MySQL Like and % wild cards, to return all the products that match the value in the template (pname}.

    Code Block
    <query name="productsByName">
    <retrieve>
                    <!--maps to HTTP GET -->
                    <statement> SELECT * FROM Products where productName LIKE '%{pName}%' order by productName </statement>
    </retrieve>
    </query>

     

  2. Click on the ComboBox control to display the Properties panel. Select Web Service as the Options Src.
  3. Provide the URL to the datasource - in this case the URL to the database query in the BIRT queryset- productsByName. Add the {<combobox control name>.matchText} parameter to specify the value of the variable - pname - in the query as the matching text typed into the Name of Product control.

    Code Block
    http://<server>:<port>/database/BIRT/productsByName?pName={NameofProduct.matchText}
    Info

    If your options will have spaces, append the URL with !encode=true to accurately filter options. Using the example above the syntax is {NameofProduct.matchtext!encode=falsetrue}.

  4. Click the save and test icon. Enter a value into the ComboBox. Determine the Binding Path from the resultSet. In the image, the number 1 was entered into the ComboBox.

  5. The ComboBox Properties panel should look like this. If you want to limit the user selection to one value, check the SIngle Value checkbox.
  6.  Users will see all the returned options that match the number 1 when it is entered in the ComboBox. Adding 8t into the ComboBox will further filter the options and display the choices that match 18t . Each time a character is entered it is added to the URL and the Web Service is invoked. Only the matching results is displayed to the user.

...