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 contents and see only the customers associated to certain countries.
K2BTools includes options to create this type of filters in a simple way, using the "Type" property in Filter variable nodes. Currently three types of Multiple Filters are supported: Multiple Combos, Multiple Lists, and Tags collection.
|Multiple Filter Type = "Combo"
||Multiple Filter Type = "TagsCollection"
|Multiple Filter Type = "List"
The developer can choose which type to use depending on the scenario being targeted. The best option for the scenario depends on the amount of candidate items that may be selected in the filter, and the expected size for the selected items collection.
To create a multiple filter, add a new Filter and set its "Filter Type" property to "Multiple". At this point, several properties will be shown. These properties can be used to customize the filter's generation. In particular, the "Multiple Filter Type" property can be used to select if the filter should be created as a "Multiple Combo", a "Multiple List", or as a "Tags Collection" filter.
The filter's logic can be customized by adding a ControlInfo node to it. If no ControlInfo node is added, that information is inferred from the attribute or domain selected in the "Based On" property.
When using MultipleCombo or MultipleList, the ControlInfo is assumed to be Combo or DynamicCombo, and the Values, Descriptions, Conditions, and Instantiated Attributes properties are read when generating the combo's contents.
When using TagsCollection, the ControlInfo information is used to define the variable present inside the filter (where the user can enter values).
In this type of filters, the following properties can be altered:
- The inclusion of a search option to find items in the Combo.
- The inclusion of a "Clear selection" action.
- The label that should be shown when no items are selected (only in Multiple Combo).
- The maximum amount of items shown in the summary shown in the Combo's control (only in Multiple Combo).
These properties can be found in Filter variable (in the "MultipleFilter" category) and also in K2BWebPanelDesignerSettings or K2BTools General Settings depending on the context (in the "MultipleFilters\MultipleCombo" category). Values in the settings objects are used as default values in Filter variable nodes.
K2BWebPanelDesignerSettings and K2BTools General Settings also include properties to define the Theme classes associated to each component in the UI associated to these filters
For this type of filters, customization options are included in K2BWebPanelDesignerSettings and K2BTools General Settings. In these nodes properties can be found to change the following:
- Amount of columns used in the tags collection.
- Add and Remove Actions (captions, images, theme classes)
- Theme classes for all UI components.