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.
|
|
Multiple Filter Type = "Combo" |
Multiple Filter Type = "TagsCollection" |
In this exercise you will learn how multiple filters work.
- Go to the EntityServices instance associated with the "Invoice" transaction.
- Add a filter with the following properties
- Name: "CustomerId"
- BasedOn: "CustomerId"
- Description: "Customers"
- FilterType: "Multiple"
|
FilterType: Multiple |
- Under the "CustomerId" filter add a "Control Info" node with the following properties
- ControlType: "DynamicComboBox"
- ItemValue: "CustomerId"
- ItemDescription: "CustomerName"
- Apply the instance and Run the application.
- See how you can select many customers in the filter.
- See how you can filter the combobox's contents.
- See how you can use the "Clear Selection" action.
- Go to the EntityServices instance associated with the "Invoice" transaction.
- Add a new filter with the following properties
- Name: "CityId"
- BasedOn: "CityId"
- Description: "Cities"
- FilterType: "Multiple"
- MultipleFilterType: "TagsCollection"
- Add a "Control Info" node to the "CityId" filter with the following properties
- ControlType: "Edit"
- Suggest: "Incremental"
- InputType: "Descriptions"
- ItemValue: "CityId"
- ItemDescription: "CityName"
- Apply the instance and run the application
- See how to filter selecting multiple cities
- 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.
|