K2BTools Tutorial - Exercise 8.3: Multiple Filters

In many scenarios it is necessary to define filters that allow the user to select more than one value. For example, in a customer transaction the end user may wish to filter the customers belonging to a set of countries.

K2BTools includes options to create this type of filters in a simple way, using the "Filter Type" property in filter nodes. Currently two types of Multiple Filters are supported: "Multiple Combos", and "Tags Collection" filters.

MultipleFilterCombo MultipleFilterTags
Multiple Filter Type = "Combo" Multiple Filter Type = "TagsCollection"

In this exercise you will learn how multiple filters work.

Multiple Combos

  1. Go to the EntityServices instance associated with the "Invoice" transaction.
  2. Add a filter with the following properties
    1. Name: "CustomerId"
    2. BasedOn: "CustomerId"
    3. Description: "Customers"
    4. FilterType: "Multiple"
      Lesson6.3MultipleFilterType
      FilterType: Multiple

  3. Under the "CustomerId" filter add a "Control Info" node with the following properties
    1. ControlType: "DynamicComboBox"
    2. ItemValue: "CustomerId"
    3. ItemDescription: "CustomerName"
  4. Apply the instance and Run the application.
    1. See how you can select many customers in the filter.
    2. See how you can filter the combobox's contents.
    3. See how you can use the "Clear Selection" action.

TagsCollection

  1. Go to the EntityServices instance associated with the "Invoice" transaction.
  2. Add a new filter with the following properties
    1. Name: "CityId"
    2. BasedOn: "CityId"
    3. Description: "Cities"
    4. FilterType: "Multiple"
    5. MultipleFilterType: "TagsCollection"
  3. Add a "Control Info" node to the "CityId" filter with the following properties
    1. ControlType: "Edit"
    2. Suggest: "Incremental"
    3. InputType: "Descriptions"
    4. ItemValue: "CityId"
    5. ItemDescription: "CityName"
  4. Apply the instance and run the application
    1. See how to filter selecting multiple cities
    2. See how you can remove cities from the filter field.

Note: The input field in the "Tags Collection" filter uses the "Control Info" node defined in the filter. In this exercise we defined a field with a suggest feature, but this could be changed. Try changing the control type to use a dynamic combo in the "Tags Collection" multiple filter.